/* App Header Styles */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.app-header.settings-modal-open {
    z-index: 2000;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-link {
    text-decoration: none;
    color: var(--text-main, #ffffff);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
}

.logo-link:hover {
    color: var(--accent, #06b6d4);
}

.logo-bc {
    color: var(--primary, #4f46e5);
    font-weight: 800;
}

.logo-dot {
    color: var(--accent, #06b6d4);
    font-weight: 800;
}

.logo-t {
    color: var(--text-main, #ffffff);
    font-weight: 800;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timetable-btn,
.settings-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main, #ffffff);
    padding: 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 48px;
    height: 48px;
}

.timetable-btn:hover,
.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent, #06b6d4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.timetable-btn:active,
.settings-btn:active {
    transform: translateY(0);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .app-header {
        padding: 0.5rem 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .header-controls {
        gap: 0.5rem;
    }

    .timetable-btn,
    .settings-btn {
        width: 44px;
        height: 44px;
        padding: 0.625rem;
        font-size: 0.9rem;
    }

    .app-header-hidden-mobile {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Settings Modal Styles */
.settings-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-backdrop:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.settings-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    z-index: 1501;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.settings-modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.settings-modal-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    border-radius: 0;
    max-width: none;
    width: 100%;
    height: 100vh;
    max-height: none;
}

.settings-modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.settings-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main, #ffffff);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-modal-close,
.settings-modal-back {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main, #ffffff);
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.settings-modal-close:hover,
.settings-modal-back:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--danger, #ef4444);
}

.settings-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Desktop Layout */
.settings-body-container {
    display: flex;
    height: 100%;
    gap: 2rem;
}

.settings-categories-column {
    flex: 0 0 200px;
}

.settings-categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.settings-category-item {
    margin-bottom: 0.5rem;
}

.settings-category-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-muted, #94a3b8);
    transition: all 0.3s ease;
}

.settings-category-item.active a,
.settings-category-item a:hover {
    background: rgba(79, 70, 229, 0.2);
    color: var(--primary-light, #6366f1);
}

.settings-options-column {
    flex: 1;
}

/* Settings Panels */
.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-panel h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main, #ffffff);
}

/* Language Options */
.settings-language-options,
.settings-theme-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.language-option,
.theme-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.language-option:hover,
.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light, #6366f1);
}

.language-option input,
.theme-option input {
    margin: 0;
}

.language-flag,
.theme-icon {
    font-size: 1.5rem;
}

.language-name,
.theme-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-main, #ffffff);
}

/* Cache Section */
.settings-cache-options {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.clear-cache-btn {
    background: linear-gradient(135deg, var(--danger, #ef4444), var(--warning, #f59e0b));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.clear-cache-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Mobile Sections */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main, #ffffff);
}

.settings-language-options,
.settings-theme-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.language-option,
.theme-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.language-option:hover,
.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-light, #6366f1);
}

.language-option input,
.theme-option input {
    margin: 0;
}

.language-flag,
.theme-icon {
    font-size: 1.5rem;
}

.language-name,
.theme-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-main, #ffffff);
}

.clear-cache-btn {
    background: linear-gradient(135deg, var(--danger, #ef4444), var(--warning, #f59e0b));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
}

.clear-cache-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-modal-content {
    animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-modal-header {
        padding: 1rem;
    }

    .settings-modal-title {
        font-size: 1.1rem;
    }

    .settings-modal-body {
        padding: 1rem;
    }

    .settings-body-container {
        flex-direction: column;
        gap: 1rem;
    }

    .settings-categories-column {
        flex: none;
    }

    .settings-categories-list {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .settings-category-item {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .settings-category-item a {
        padding: 0.75rem;
        white-space: nowrap;
    }
}