/* Import Google Font - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --dark-bg: #0f0f23;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #b4b4b4;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, rgba(245, 87, 108, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Recording Notice */
.recording-notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(220, 38, 38, 0.95);
    color: white;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.recording-notice span {
    margin-right: 8px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}


/* Start Screen Overlay */
.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease;
}

.start-overlay.blur-exit {
    animation: blurOut 0.8s ease forwards;
}

@keyframes blurOut {
    0% {
        opacity: 1;
        filter: blur(0px);
    }

    100% {
        opacity: 0;
        filter: blur(20px);
        pointer-events: none;
    }
}

.start-container {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    animation: slideUpFade 0.8s ease;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.start-title {
    font-size: 48px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.2;
}

.start-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.start-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.btn-start {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 20px 50px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-start:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.6);
}

.btn-start:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-start-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.start-note {
    margin-top: 30px;
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Assessment Content - Hidden Initially */
.assessment-content {
    opacity: 0;
    animation: fadeInContent 0.8s ease 0.3s forwards;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        filter: blur(10px);
    }

    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* Blur Background Effect - Removed for recording notice readability */


/* Recording Notice */
.recording-notice {
    background: var(--warning-gradient);
    color: #000;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(250, 112, 154, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.recording-notice span {
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px 120px 20px;
}

/* Timer Section */
.timer-section {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timer-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#timer {
    font-size: 56px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

#timer.timer-warning {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: timerBlink 1s infinite;
}

@keyframes timerBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    height: 100%;
    background: var(--success-gradient);
    border-radius: 20px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(67, 233, 123, 0.5);
}

/* Question Card */
.question-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Header */
#sectionHeader {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.section-badge {
    display: inline-block;
    background: var(--primary-gradient);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

#sectionHeader h2 {
    font-size: 28px;
    margin-bottom: 5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-time {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Question Content */
.question-header h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 500;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
}

.question-note {
    background: rgba(250, 112, 154, 0.1);
    border-left: 3px solid #f5576c;
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.code-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-block code {
    color: #a8dadc;
}

/* Answer Section */
.answer-section {
    margin-top: 25px;
}

.answer-input,
.answer-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
}

.answer-input:focus,
.answer-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.answer-textarea {
    min-height: 120px;
}

/* MCQ Options */
.mcq-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mcq-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mcq-option:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    transform: translateX(5px);
}

.mcq-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: #667eea;
}

.mcq-option span {
    font-size: 16px;
}

/* True/False Options */
.tf-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.tf-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tf-option:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.tf-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: #667eea;
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Notification */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
    display: none;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: var(--success-gradient);
    color: #000;
}

.notification.warning {
    background: var(--warning-gradient);
    color: #000;
}

.notification.info {
    background: var(--primary-gradient);
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    #timer {
        font-size: 42px;
    }

    .question-card {
        padding: 20px;
    }

    #sectionHeader h2 {
        font-size: 22px;
    }

    .question-text {
        font-size: 18px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .tf-options {
        flex-direction: column;
    }
}

/* Submit Page Styles */
.submit-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 20px 20px 60px;
    min-height: calc(100vh - 200px);
}

.submit-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: fadeIn 0.8s ease;
}

.submit-card h1 {
    font-size: 32px;
    margin-bottom: 15px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.submit-card p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

#nameInput {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
}

#nameInput:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Welcome Card Styles (added as part of the change) */
.welcome-card input[type="text"],
.welcome-card input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.welcome-card input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.welcome-card input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

/* OTP Section */
#otpSection {
    margin-top: 20px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
}

.otp-info {
    margin-bottom: 16px;
    text-align: center;
}

.otp-info p {
    margin: 4px 0;
    font-size: 14px;
}

.otp-timer {
    color: #fa709a;
    font-weight: 600;
}

#otpInput {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 600;
}

.resend-btn {
    width: 100%;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.resend-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #667eea;
    transform: translateY(-2px);
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button-54 Style - 3D Shadow Effect */
.button-54 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--primary-gradient);
    cursor: pointer;
    border: 3px solid #667eea;
    padding: 14px 32px;
    box-shadow:
        1px 1px 0px 0px #667eea,
        2px 2px 0px 0px #667eea,
        3px 3px 0px 0px #764ba2,
        4px 4px 0px 0px #764ba2,
        5px 5px 0px 0px #764ba2;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 100%;
    display: inline-block;
    text-align: center;
}

.button-54:hover {
    box-shadow:
        1px 1px 0px 0px #764ba2,
        2px 2px 0px 0px #764ba2,
        3px 3px 0px 0px #667eea,
        4px 4px 0px 0px #667eea,
        5px 5px 0px 0px #667eea,
        6px 6px 0px 0px #667eea;
}

.button-54:active {
    box-shadow: 0px 0px 0px 0px;
    top: 5px;
    left: 5px;
}

.button-54:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow:
        1px 1px 0px 0px rgba(102, 126, 234, 0.5),
        2px 2px 0px 0px rgba(102, 126, 234, 0.5),
        3px 3px 0px 0px rgba(118, 75, 162, 0.5);
}

@media (min-width: 768px) {
    .button-54 {
        padding: 16px 40px;
        font-size: 18px;
    }
}

.success-message {
    background: var(--success-gradient);
    color: #000;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    font-weight: 600;
    display: none;
}

.success-message.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 20px;
    margin: 40px auto 0;
    color: var(--text-secondary);
    font-size: 14px;
    width: 100%;
    max-width: 1200px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: block !important;
    opacity: 1 !important;
}

.app-footer p {
    margin: 0 auto;
    text-align: center;
    max-width: 100%;
}

.app-footer strong {
    color: var(--text-primary);
    font-weight: 600;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}