/* ============================
   NTE Community Survey — Styles
   ============================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #07080d;
    --bg-secondary: #0d0f18;
    --bg-card: #111425;
    --bg-card-hover: #161a32;
    --bg-card-selected: #141833;

    --border-default: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-selected: rgba(0, 240, 255, 0.4);

    --text-primary: #f0f2ff;
    --text-secondary: #8b8fa8;
    --text-muted: #5a5e78;

    --accent-cyan: #00f0ff;
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;

    --gradient-main: linear-gradient(135deg, #00f0ff 0%, #a855f7 100%);
    --gradient-alt: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    --gradient-glow: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.08) 0%, transparent 60%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(0, 240, 255, 0.1);

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Particles Canvas --- */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* --- Floating Orbs --- */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-cyan);
    top: -150px;
    right: -150px;
    animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    bottom: 10%;
    left: -120px;
    animation: orbFloat2 25s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-pink);
    top: 50%;
    right: 10%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, 80px) scale(1.1); }
    66% { transform: translate(40px, -40px) scale(0.9); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, -60px) scale(1.15); }
    66% { transform: translate(-30px, 50px) scale(0.85); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-70px, -50px) scale(1.1); }
}

/* --- Container --- */
.container {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* --- Header --- */
.header {
    text-align: center;
    padding: 60px 0 48px;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 100px;
    padding: 6px 18px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 28px;
    animation: fadeInDown 0.6s ease-out;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.header-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    animation: fadeInDown 0.6s ease-out 0.1s both;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-alt {
    background: var(--gradient-alt);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
    animation: fadeInDown 0.6s ease-out 0.2s both;
}

.header-subtitle strong {
    color: var(--text-primary);
    font-weight: 600;
}

.header-stats {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 16px 32px;
    animation: fadeInDown 0.6s ease-out 0.3s both;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-default);
}

/* --- Question Cards --- */
.question-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out both;
    transition: border-color var(--transition-medium);
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-main);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.question-card:hover {
    border-color: var(--border-hover);
}

.question-card:hover::before {
    opacity: 1;
}

.question-card:nth-child(1) { animation-delay: 0.1s; }
.question-card:nth-child(2) { animation-delay: 0.2s; }
.question-card:nth-child(3) { animation-delay: 0.3s; }
.question-card:nth-child(4) { animation-delay: 0.4s; }
.question-card:nth-child(5) { animation-delay: 0.5s; }
.question-card:nth-child(6) { animation-delay: 0.6s; }

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.question-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-cyan);
    opacity: 0.7;
}

.question-required {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.1);
    padding: 3px 10px;
    border-radius: 100px;
}

.question-optional {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 10px;
    border-radius: 100px;
}

.question-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
}

.question-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* --- Radio Option Cards --- */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    user-select: none;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.option-card:has(input:checked) {
    background: var(--bg-card-selected);
    border-color: var(--border-selected);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.08), inset 0 0 20px rgba(0, 240, 255, 0.02);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.option-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    transition: background var(--transition-medium);
}

.option-card:has(input:checked) .option-icon {
    background: rgba(0, 240, 255, 0.1);
}

.option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.option-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.option-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.option-card:has(input:checked) .option-text span {
    color: var(--text-secondary);
}

.option-check {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border: 2px solid var(--border-default);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-medium);
}

.option-check svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-bounce);
    color: var(--accent-cyan);
}

.option-card:has(input:checked) .option-check {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.15);
}

.option-card:has(input:checked) .option-check svg {
    opacity: 1;
    transform: scale(1);
}

/* --- Checkbox Cards --- */
.checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    cursor: pointer;
    transition: all var(--transition-medium);
    user-select: none;
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.checkbox-card:has(input:checked) {
    background: var(--bg-card-selected);
    border-color: var(--border-selected);
}

.checkbox-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-box {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 2px solid var(--border-hover);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-medium);
}

.checkbox-box svg {
    width: 13px;
    height: 13px;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-bounce);
    color: var(--accent-cyan);
}

.checkbox-card:has(input:checked) .checkbox-box {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.15);
}

.checkbox-card:has(input:checked) .checkbox-box svg {
    opacity: 1;
    transform: scale(1);
}

.checkbox-content span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition-medium);
}

.checkbox-card:has(input:checked) .checkbox-content span {
    color: var(--text-primary);
}

/* --- Textarea --- */
.textarea-wrapper {
    position: relative;
}

.textarea-wrapper textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    transition: border-color var(--transition-medium), box-shadow var(--transition-medium);
    outline: none;
}

.textarea-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.textarea-wrapper textarea:focus {
    border-color: var(--border-selected);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.06);
}

.textarea-counter {
    position: absolute;
    bottom: 12px;
    right: 14px;
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

/* --- Submit Section --- */
.submit-section {
    text-align: center;
    padding: 16px 0 40px;
    animation: fadeInUp 0.5s ease-out 0.7s both;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-main);
    color: #07080d;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 16px 40px;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.3);
}

.submit-btn:hover::before {
    opacity: 1;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-icon svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-medium);
}

.submit-btn:hover .submit-icon svg {
    transform: translateX(4px);
}

.submit-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 14px;
}

/* --- Success Screen --- */
.success-screen {
    display: none;
    text-align: center;
    padding: 80px 0;
    animation: fadeInUp 0.6s ease-out;
}

.success-screen.visible {
    display: block;
}

.success-icon {
    margin-bottom: 28px;
}

.success-icon svg {
    width: 80px;
    height: 80px;
}

.success-check {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 0.6s ease-out 0.3s forwards;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.success-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.success-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.success-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 0 auto 32px;
    max-width: 480px;
    text-align: left;
}

.success-summary .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-default);
    font-size: 0.88rem;
}

.success-summary .summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-secondary);
}

.summary-value {
    font-weight: 600;
    color: var(--accent-cyan);
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-medium);
}

.share-btn:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
}

.share-btn svg {
    width: 18px;
    height: 18px;
    color: var(--accent-cyan);
}

.reset-btn {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-medium);
}

.reset-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 40px 0 20px;
    border-top: 1px solid var(--border-default);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-sub {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-top: 6px;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Loading spinner for submit --- */
.submit-btn.loading .submit-text {
    opacity: 0;
}

.submit-btn.loading .submit-icon {
    animation: spin 0.8s linear infinite;
}

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

/* --- Responsive --- */
@media (max-width: 640px) {
    .container {
        padding: 20px 16px 40px;
    }

    .header {
        padding: 40px 0 32px;
    }

    .header-stats {
        gap: 16px;
        padding: 14px 20px;
    }

    .question-card {
        padding: 24px 20px;
    }

    .option-card {
        padding: 14px 16px;
    }

    .option-icon {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }

    .option-text strong {
        font-size: 0.88rem;
    }

    .option-text span {
        font-size: 0.75rem;
    }

    .submit-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 32px;
    }

    .success-actions {
        flex-direction: column;
    }

    .share-btn, .reset-btn {
        width: 100%;
        justify-content: center;
    }

    .orb-1 { width: 300px; height: 300px; }
    .orb-2 { width: 250px; height: 250px; }
    .orb-3 { width: 200px; height: 200px; }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

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

/* --- Selection --- */
::selection {
    background: rgba(0, 240, 255, 0.25);
    color: var(--text-primary);
}

/* --- Toast Notifications --- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease;
    opacity: 0;
    max-width: 90vw;
    white-space: nowrap;
}

.toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--accent-cyan);
}

.toast-error {
    background: rgba(236, 72, 153, 0.12);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: var(--accent-pink);
}

.toast-icon {
    font-size: 1.1rem;
}

.toast-message {
    overflow: hidden;
    text-overflow: ellipsis;
}
