:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --background-color: #ffffff;
    --border-color: #e0e0e0;
    --text-color: #333333;
    --text-light-color: #7f8c8d;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.vpk-unpacker-frontend {
    font-family: var(--font-family);
    width: 100%;
    padding: 40px;
    background-color: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    color: var(--text-color);
    box-sizing: border-box;
}

.vpk-unpacker-header {
    text-align: center;
    margin-bottom: 30px;
}

.vpk-unpacker-title {
    color: var(--secondary-color);
    font-size: 2em;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-bottom: 10px;
}

#file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#file-drop-zone.dragover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}

#file-drop-zone .file-drop-zone-content .main-text {
    margin: 10px 0 5px;
    font-size: 1.2em;
    color: var(--text-color);
    font-weight: 600;
}

#file-drop-zone .file-drop-zone-content .sub-text {
    margin: 0;
    font-size: 1em;
    color: var(--text-light-color);
}

.icon-container {
    margin-bottom: 20px;
}

.upload-icon {
    width: 50px;
    height: 50px;
    color: var(--primary-color);
}

.vpk-unpacker-frontend button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.vpk-unpacker-frontend button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.vpk-unpacker-frontend button:active {
    transform: translateY(0);
}

#progressContainer {
    margin-top: 30px;
}

#progressBar {
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 6px;
    overflow: hidden;
    background-color: #ecf0f1;
}

#progressBar::-webkit-progress-bar {
    background-color: #ecf0f1;
}

#progressBar::-webkit-progress-value {
    background-color: var(--success-color);
}

#progressBar::-moz-progress-bar {
    background-color: var(--success-color);
}

#messages .notice {
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid transparent;
}

#messages .notice-error {
    background-color: #fbeae5;
    border-color: var(--error-color);
    color: #c0392b;
}

#messages .notice-success {
    background-color: #eafaf1;
    border-color: var(--success-color);
    color: #27ae60;
}

#output-container {
    margin-top: 30px;
}

#output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#output-header button {
    background-color: var(--secondary-color);
}

#output-header button:hover {
    background-color: #34495e;
}

#output {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    background-color: #fdfdfd;
}

.dir-entry {
    margin-bottom: 10px;
}

.dir-header {
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.dir-header:hover {
    background-color: #f0f0f0;
}

.dir-entry:nth-child(odd) > .dir-header, .file-entry:nth-child(odd) {
    background-color: #f9f9f9;
}

.dir-entry:nth-child(even) > .dir-header, .file-entry:nth-child(even) {
    background-color: #ffffff;
}

.dir-header i {
    margin-right: 8px;
    color: var(--text-light-color);
}

.dir-content {
    padding-left: 25px;
    display: none; /* 初始隐藏 */
}

.file-entry {
    padding: 5px 0;
}

.file-entry a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.file-entry a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.vpk-unpacker-frontend button.preview-btn {
    margin-left: 10px;
    padding: 2px 6px;
    font-size: 0.75em;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease-in-out;
    /* 重置继承的样式 */
    font-weight: normal;
    transform: none;
}

.file-entry:hover button.preview-btn {
    visibility: visible;
    opacity: 1;
}

.vpk-unpacker-frontend button.preview-btn:hover {
    background-color: #34495e;
    transform: none; /* 防止继承全局按钮的悬停变换效果 */
}
