/* iOS Design Theme */
:root {
    --ios-blue: #007AFF;
    --ios-gray-bg: #F2F2F7;
    --ios-card-bg: #FFFFFF;
    --ios-text: #1C1C1E;
    --ios-text-secondary: #8E8E93;
    --ios-border-radius: 16px;
    --ios-input-bg: #E5E5EA;
    --ios-red: #FF3B30;
    --ios-green: #34C759;
    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Modern Glassmorphism Theme */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-stack);
    background: #0f0c29;
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
    color: var(--ios-text);
    /* Note: Overridden in glass-card */
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Glass Card */
.glass-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 420px;
    text-align: center;
    color: white;
    z-index: 10;
    animation: slideUp 0.5s ease-out;
}

.card-header h1 {
    font-size: 32px;
    margin: 10px 0;
    font-weight: 700;
}

.card-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    margin-bottom: 30px;
}

.icon-wrapper {
    font-size: 48px;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Background Blobs */
.background-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: moveBlob 10s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: #FF3B30;
    border-radius: 50%;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: #007AFF;
    border-radius: 50%;
    animation-direction: alternate-reverse;
}

@keyframes moveBlob {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(30px, 30px);
    }
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

input[type="text"],
input[type="tel"],
input[type="password"],
select {
    width: 100%;
    padding: 18px 20px 18px 50px;
    /* Space for icon */
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    /* Dark glass input */
    font-size: 16px;
    color: white;
    box-sizing: border-box;
    transition: all 0.3s;
    font-family: var(--font-stack);
}

select {
    padding-left: 20px;
    background: rgba(0, 0, 0, 0.2);
    /* Slightly darker for select to standardise */
    color: white;
}

select option {
    background: #333;
    color: white;
}

input:focus,
select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    outline: none;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.7;
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, #007AFF, #005ecb);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 122, 255, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.5);
}

.primary-btn:active {
    transform: scale(0.98);
}

.error-banner {
    background: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.4);
    color: #ff8a8a;
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 25px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-banner::before {
    content: '⚠️';
}

/* Split View for Interview */
.split-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: white;
}

.left-panel {
    width: 35%;
    background: #F9F9FB;
    /* Very light gray */
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding: 40px;
    box-sizing: border-box;
    overflow-y: auto;
}

.left-panel h2 {
    font-size: 22px;
    margin-top: 0;
}

.question-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.right-panel {
    width: 65%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #1e1e1e;
    /* Darker code bg */
}

textarea.code-editor {
    flex: 1;
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
    border: none;
    background-color: #1e1e1e;
    color: #d4d4d4;
    /* VS Code-like text */
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
}

/* Floating Submit Button */
.submit-container {
    position: absolute;
    bottom: 30px;
    right: 30px;
}

.submit-btn {
    width: auto;
    background-color: var(--ios-green);
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.4);
    padding: 14px 32px;
}

/* Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Status Bar Overlay - Glassmorphism */
#status-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 100;
}

#status-bar.violation {
    background: rgba(255, 59, 48, 0.85);
}

/* Fullscreen Overlay Styling */
#fullscreen-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
}

#fullscreen-overlay h1 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.start-fs-btn {
    background-color: var(--ios-green);
    border-radius: 14px;
    font-weight: 600;
    padding: 16px 32px;
}