:root {
    --bg-light: #f5f5f5;
    --card-bg: rgba(255, 255, 255, 0.85);
    --primary: #0284c7;
    /* Deep Vibrant Cyan */
    --primary-light: rgba(2, 132, 199, 0.25);
    --primary-dark: #0369a1;
    --secondary: #9333ea;
    /* Deep Vibrant Purple */
    --secondary-light: #a855f7;
    --secondary-dark: #7e22ce;
    --accent: #ea580c;
    /* High Contrast Orange/Gold */
    --bg-main: #f5f5f5;
    --text-main: #0f172a;
    --text-muted: #334155;
    --border-color: rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --primary-gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow-premium: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.15);
    --glass-blur: blur(20px);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
    z-index: 1;
}

/* Background Effects from Registration Project */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
    opacity: 0.35;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    animation: move-blobs 20s infinite alternate;
}

.blob-1 {
    background: var(--primary);
    top: -10%;
    left: -10%;
}

.blob-2 {
    background: var(--secondary);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    background: var(--accent);
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    animation-delay: -10s;
}

@keyframes move-blobs {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.1);
    }
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 2.5rem;
    width: 100%;
    box-shadow: var(--shadow-premium);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

#login-container {
    max-width: 480px;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

/* Original Component Styles (Restored) */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    letter-spacing: -1px;
}

.header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 300;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    opacity: 0.8;
    padding-left: 0.2rem;
}

.input-container {
    position: relative;
    transition: all 0.3s ease;
}

.input-container i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

input {
    width: 100%;
    padding: 14px 14px 14px 3rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

input:focus+i {
    color: var(--primary);
}

button {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#error-message {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 0.95rem;
    display: none;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Dashboard Specific Redesign */
.dashboard-layout {
    width: 100%;
    max-width: 1200px;
    padding: 2rem 2rem 6rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    align-self: flex-start;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 20px;
    z-index: 1000;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.btn-icon {
    width: auto;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    margin-top: 0;
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-logout {
    background: #ffffff;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-logout:hover {
    background: #fff1f2;
    color: var(--danger);
    border-color: var(--danger);
    transform: translateY(-2px);
}

/* Layout Grid */
.grid-containers {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 968px) {
    .grid-containers {
        grid-template-columns: 1fr;
    }
}

.hero-card {
    padding: 4rem;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent), #ffffff;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--primary-gradient);
    opacity: 0.05;
    border-radius: 50%;
    filter: blur(40px);
}

.user-accent {
    width: 4px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.user-info h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -1.5px;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.user-meta i {
    color: var(--primary);
    opacity: 0.7;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.task-card {
    position: relative;
    border-left: 6px solid var(--primary);
}

.challenge-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.challenge-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.btn-primary-premium {
    background: var(--primary-gradient);
    color: white;
    height: 60px;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
    margin-top: 1rem;
}

.btn-primary-premium:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.5);
}

.btn-primary-premium:disabled {
    opacity: 0.6;
    background: #e2e8f0;
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

.feedback-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 16px;
    font-style: italic;
    color: var(--text-muted);
    border-right: 4px solid var(--secondary-light);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    animation: modalPulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPulse {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

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

#exam-timer {
    background: #fff1f2;
    color: var(--secondary-dark);
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
}

footer {
    padding: 4rem 0 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Embedded Exam Portal */
.embedded-portal {
    width: 100%;
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border-color);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.embedded-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.portal-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.portal-title-accent {
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 10px;
}

.portal-timer {
    font-weight: 800;
    color: var(--secondary);
    font-size: 1.4rem;
    background: #fff1f2;
    padding: 10px 24px;
    border-radius: 16px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.1);
}

.question-container {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 3.5rem;
    border-radius: 32px;
    margin-bottom: 2.5rem;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}

.question-title {
    margin-top: 0;
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.question-desc {
    color: var(--text-muted);
    line-height: 2;
    font-size: 1.15rem;
}

.info-banner {
    background: rgba(99, 102, 241, 0.05);
    border-left: 5px solid var(--primary);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    color: var(--primary-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* IDE Platforms Styling */
.ide-platforms-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.ide-platforms-container h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.ide-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    min-height: 140px;
}

.ide-link img {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.ide-link span {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    text-align: center;
}

.ide-link:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.1);
}

.ide-link:hover img {
    transform: scale(1.1);
}

.help-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.help-link:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

/* Step Transitions */
#exam-step-1,
#exam-step-2 {
    animation: fadeInScale 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }

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

@media (max-width: 640px) {
    .ide-grid {
        grid-template-columns: 1fr 1fr;
    }
}