@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --secondary: #93c5fd;
    --bg-color: #f0f4f8;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --danger: #ef4444;
    --clay-shadow: 12px 12px 24px rgba(163, 177, 198, 0.4), -12px -12px 24px rgba(255, 255, 255, 1);
    --clay-shadow-sm: 6px 6px 12px rgba(163, 177, 198, 0.3), -6px -6px 12px rgba(255, 255, 255, 1);
    --clay-inset: inset 6px 6px 12px rgba(163, 177, 198, 0.3), inset -6px -6px 12px rgba(255, 255, 255, 1);
    --radius-lg: 30px;
    --radius-md: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Claymorphism Utility */
.clay-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--clay-shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.clay-button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 4px 4px 10px rgba(34, 197, 94, 0.3);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.clay-button:active {
    transform: scale(0.95);
    box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.1);
}

.clay-button.secondary {
    background: var(--secondary);
    color: #1e40af;
    box-shadow: 4px 4px 10px rgba(147, 197, 253, 0.3);
}

.clay-button.outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

input, select, textarea {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    background: var(--bg-color);
    box-shadow: var(--clay-inset);
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

input:focus {
    border-color: var(--secondary);
}

/* Auth Layout */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.auth-card {
    max-width: 450px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--primary);
    font-size: 2.5rem;
}

@media (max-width: 480px) {
    .auth-header h1 {
        font-size: 2rem;
    }
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--card-bg);
    box-shadow: var(--clay-shadow-sm);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.main-content {
    flex: 1;
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.mobile-header {
    display: none;
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    box-shadow: var(--clay-shadow-sm);
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1001;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 0.8rem 1.5rem;
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.75rem;
    gap: 4px;
    font-weight: 600;
}

.bottom-nav-item i, .bottom-nav-item .icon {
    font-size: 1.2rem;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.nav-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.nav-item:hover, .nav-item.active {
    background: var(--bg-color);
    box-shadow: var(--clay-inset);
    color: var(--primary);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }
    .sidebar {
        display: none; /* Hide traditional sidebar */
    }
    .mobile-header {
        display: flex;
    }
    .bottom-nav {
        display: flex;
    }
    .main-content {
        padding: 1.5rem;
        padding-bottom: 100px; /* Space for bottom nav */
    }
    .responsive-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    h1 {
        font-size: 1.8rem !important;
    }
}

/* Tryout Interface */
.tryout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.timer-box {
    background: var(--card-bg);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--clay-shadow-sm);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--danger);
}

@media (max-width: 600px) {
    .tryout-header {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center !important;
    }
    .timer-box {
        order: 3;
        width: 100%;
        text-align: center;
    }
}

.question-area {
    margin-bottom: 2rem;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.option-card {
    background: var(--card-bg);
    padding: 1.2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--clay-shadow-sm);
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-card:hover {
    transform: translateY(-2px);
}

.option-card.selected {
    border-color: var(--primary);
    background: #f0fdf4;
}

.option-indicator {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.selected .option-indicator {
    background: var(--primary);
    color: white;
}

.navigation-panel {
    position: fixed;
    right: 2rem;
    top: 6rem;
    width: 300px;
}

.question-numbers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.q-num {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-color);
    box-shadow: var(--clay-shadow-sm);
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.q-num.answered {
    background: var(--primary);
    color: white;
}

.q-num.current {
    box-shadow: var(--clay-inset);
    border: 2px solid var(--secondary);
}

@media (max-width: 1024px) {
    .navigation-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        background: white;
        z-index: 1000;
        padding: 2rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        display: none; /* Modal style */
        height: 70vh;
        overflow-y: auto;
    }
    
    .navigation-panel.show {
        display: block;
        box-shadow: 0 -10px 50px rgba(0,0,0,0.3);
        animation: slideUp 0.3s ease-out;
    }

    #mobile-nav-toggle {
        display: block !important;
    }

    .dashboard-layout {
        flex-direction: column;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}
