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

:root {
    /* Colors - Dark Cyber theme matching Behind the Screen game */
    --bg-color: #080312;
    --card-bg: rgba(20, 10, 35, 0.45);
    --border-color: rgba(138, 0, 255, 0.18);
    --text-bright: #f2edf8;
    --text-dim: #8b8398;
    
    --accent-cyan: #00f0ff;
    --accent-pink: #ff007f;
    --accent-purple: #8a00ff;
    --accent-yellow: #ffd000;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dim);
    min-height: 100vh;
    padding: 40px 20px;
    overflow-x: hidden;
    position: relative;
}

/* CRT Scanlines Overlay */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 6px 100%;
    z-index: 999;
    pointer-events: none;
    opacity: 0.4;
}

/* Background Cyber Grid */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(138, 0, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 0, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
}

/* Atmospheric Glow Blobs */
.background-glow {
    position: fixed;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(circle, rgba(138, 0, 255, 0.12) 0%, rgba(255, 0, 127, 0.04) 50%, transparent 100%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 3px;
}

.logo-accent {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-purple);
}

.logo-sub {
    color: var(--accent-cyan);
    font-size: 12px;
    background: rgba(0, 240, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.nav-select {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-bright);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
}

.nav-select:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.nav-select option {
    background-color: #120925;
    color: #fff;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 20px 0;
}

.hero-section h1 {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.hero-subtitle {
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Glassmorphism Card Style */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Workspace Grid */
.portal-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

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

/* Form Panel */
.form-panel h2 {
    font-size: 22px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.section-desc {
    font-size: 13px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.story-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-bright);
}

/* Custom Inputs & Dropdowns */
.story-form input[type="text"],
.story-form select,
.story-form textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(138, 0, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all var(--transition-fast);
}

.story-form input[type="text"]::placeholder,
.story-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

.story-form input[type="text"]:focus,
.story-form select:focus,
.story-form textarea:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.15);
    background-color: rgba(0, 0, 0, 0.5);
}

.story-form select option {
    background-color: #120925;
    color: #fff;
}

/* Character Counter Label Row */
.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-counter {
    font-size: 11px;
    color: var(--text-dim);
}

/* Styled Checkbox */
.check-group {
    flex-direction: row !important;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 13px !important;
    text-transform: none !important;
    color: var(--text-dim) !important;
    line-height: 1.4;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(138, 0, 255, 0.3);
    border-radius: 5px;
    transition: all var(--transition-fast);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-cyan);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 8px var(--accent-purple);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Buttons */
.btn {
    position: relative;
    padding: 14px 28px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

.btn.neon-pink {
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.15) 0%, rgba(138, 0, 255, 0.05) 100%);
    border-color: var(--accent-pink);
    color: #fff;
}

.btn.neon-pink:hover:not(:disabled) {
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.45);
    border-color: var(--accent-pink);
    transform: translateY(-2px);
}

.btn.neon-cyan {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(138, 0, 255, 0.05) 100%);
    border-color: var(--accent-cyan);
    color: #fff;
}

.btn.neon-cyan:hover:not(:disabled) {
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.45);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner Loader */
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Info Panel */
.info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-panel h2 {
    font-size: 22px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.info-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 18px;
    transition: all var(--transition-fast);
}

.info-step:hover {
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.step-num {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(138, 0, 255, 0.4);
}

.step-text h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-text p {
    font-size: 12.5px;
    line-height: 1.5;
}

.privacy-note {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(0, 240, 255, 0.04);
    border: 1px dashed rgba(0, 240, 255, 0.25);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 10px;
}

.lock-icon {
    font-size: 18px;
}

.privacy-note p {
    font-size: 12px;
    color: var(--accent-cyan);
    line-height: 1.45;
}

/* Footer helplines */
.portal-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portal-footer h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-pink);
    text-shadow: 0 0 10px rgba(255, 0, 127, 0.2);
}

.portal-footer p {
    font-size: 12px;
    line-height: 1.5;
}

.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

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

.support-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 12px;
}

.support-icon {
    font-size: 16px;
}

.support-item strong {
    font-size: 12px;
    color: #fff;
    display: block;
    margin-bottom: 2px;
}

.support-number {
    font-size: 12px;
    color: var(--accent-cyan);
    font-weight: 600;
    display: block;
}

.support-info {
    font-size: 10px;
    color: var(--text-dim);
}

/* SUCCESS MODAL POPUP */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(8, 3, 18, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 420px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: modalScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon-wrap {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 240, 255, 0.1);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.success-icon {
    font-size: 30px;
    color: var(--accent-cyan);
    font-weight: 800;
}

.modal-card h2 {
    font-size: 20px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 1px;
}

.modal-card p {
    font-size: 13px;
    line-height: 1.5;
}

/* Jitter glitch effect for penalty visualization */
.glitch-effect {
    animation: jitter 0.2s infinite alternate;
}

@keyframes jitter {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(1px, -1px); }
    60% { transform: translate(-1px, 2px); }
    80% { transform: translate(2px, 1px); }
    100% { transform: translate(0, 0); }
}
