/* ===== ADD THIS TO THE TOP OF YOUR styles.css FILE ===== */

/* THEME VARIABLES - Light/Dark Mode */
:root {
    --bg-color: #0a0a0f;
    --card-bg: #13131f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-primary: #00f2ff;
    --accent-secondary: #7000ff;
    --gradient-main: linear-gradient(135deg, #00f2ff 0%, #7000ff 100%);
    --nav-height: 80px;
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --card-bg: #f5f5f7;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-primary: #0066cc;
    --accent-secondary: #5000cc;
    --gradient-main: linear-gradient(135deg, #0066cc 0%, #5000cc 100%);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent-primary);
}

/* Auth Button in Nav */
.auth-btn {
    padding: 0.5rem 1.5rem !important;
    background: var(--gradient-main);
    border-radius: 25px;
    font-weight: 600;
}

/* Authentication Modals */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.auth-modal-content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.auth-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.auth-modal-content h2 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.auth-tab.active {
    background: var(--gradient-main);
    color: white;
    border-color: transparent;
}

.auth-tab-content.hidden {
    display: none;
}

.auth-input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

.auth-input::placeholder {
    color: var(--text-secondary);
}

.auth-btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-main);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(112, 0, 255, 0.4);
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    background: var(--card-bg);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-btn {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--accent-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

/* Resource Cards - Enhanced Design */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.resource-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 242, 255, 0.2);
}

.resource-thumbnail-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 242, 255, 0.1), rgba(112, 0, 255, 0.1));
}

.resource-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.resource-card:hover .resource-thumbnail {
    transform: scale(1.1);
}

.resource-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.resource-category {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.resource-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.resource-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.resource-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.subject-info {
    display: flex;
    flex-direction: column;
}

.subject-info .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subject-info .code {
    font-weight: 700;
    color: #eab308;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.download-btn {
    background: #dc2626;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 100px;
    text-align: center;
}

.download-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.download-btn.downloading {
    background: #ef4444;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.download-btn.downloaded {
    background: #16a34a;
}

/* Resource Filters */
.resource-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar-large {
    flex: 1;
    min-width: 250px;
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.search-bar-large:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--gradient-main);
    color: white;
    border-color: transparent;
}