@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 60, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-primary: #e8e8f0;
    --text-secondary: #c8c8e0;
    --text-muted: #9090b0;
    --accent-blue: #6ea0ff;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-green: #34d399;
    --accent-amber: #fbbf24;
    --gradient-main: linear-gradient(135deg, #4f8cff 0%, #a855f7 50%, #ec4899 100%);
    --shadow-glow: 0 0 30px rgba(79, 140, 255, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(79, 140, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes bgFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(2%, -2%) rotate(1deg);
    }

    66% {
        transform: translate(-1%, 1%) rotate(-1deg);
    }
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 80px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 24px;
    animation: fadeInDown 0.6s ease;
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.header p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

/* Progress */
.progress-wrap {
    margin-bottom: 24px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Cards / Steps */
.step {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 28px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-glow);
    display: none;
}

.step.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

.step h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step h2 .icon {
    font-size: 22px;
}

.step .subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 18px;
    line-height: 1.6;
}

/* Scale info box */
.scale-info {
    background: rgba(79, 140, 255, 0.08);
    border: 1px solid rgba(79, 140, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--accent-blue);
    line-height: 1.6;
}

/* Subsection title */
.subsection {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-purple);
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.subsection:first-of-type {
    margin-top: 0;
}

/* Form fields */
.field-group {
    margin-bottom: 16px;
}

label.field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

select,
input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

select,
input[type="text"],
input[type="number"],
textarea {
    caret-color: var(--accent-blue);
}

::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0c0' d='M6 8.5L1 3.5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

select option {
    background: #1a1a2e;
    color: #e8e8f0;
}

select:focus,
input:focus,
textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox / Radio groups */
.check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.check-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.check-group label:hover {
    background: rgba(255, 255, 255, 0.08);
}

.check-group label.selected {
    background: rgba(79, 140, 255, 0.12);
    border-color: rgba(79, 140, 255, 0.3);
    color: var(--accent-blue);
}

.check-group input {
    display: none;
}

/* Likert scale items */
.likert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.likert-num {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 24px;
    text-align: right;
    flex-shrink: 0;
}

.likert-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    min-width: 0;
}

.likert-buttons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.likert-buttons .lb {
    width: 34px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.likert-buttons .lb:hover {
    background: rgba(79, 140, 255, 0.12);
    color: var(--accent-blue);
    border-color: rgba(79, 140, 255, 0.3);
}

.likert-buttons .lb.active {
    background: rgba(79, 140, 255, 0.2);
    color: var(--accent-blue);
    border-color: rgba(79, 140, 255, 0.4);
    font-weight: 600;
}

/* Scale header (anchor labels) */
.scale-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 12px;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

.scale-header .sh-text {
    flex: 1;
    min-width: 0;
}

.scale-header .sh-labels {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.scale-header .sh-labels span {
    width: 34px;
    text-align: center;
    font-size: 10px;
    line-height: 1.2;
}

/* MCQ (AI Literacy) */
.mcq-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.mcq-question {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.5;
}

.mcq-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mcq-options label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.4;
}

.mcq-options label:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mcq-options label.selected {
    background: rgba(79, 140, 255, 0.1);
    border-color: rgba(79, 140, 255, 0.3);
}

.mcq-options input {
    display: none;
}

.mcq-options .opt-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    color: var(--text-muted);
}

.mcq-options label.selected .opt-letter {
    background: var(--accent-blue);
    color: white;
}

/* Navigation */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    padding: 12px 16px;
    z-index: 100;
}

.nav-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 20px rgba(79, 140, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(79, 140, 255, 0.4);
}

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

.btn-secondary {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-export {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
    color: var(--accent-green);
}

.btn-export:hover {
    background: rgba(52, 211, 153, 0.2);
}

/* Success screen */
.success-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Validation warning */
.warn-msg {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: #f87171;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 12px;
    display: none;
}

.warn-msg.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Misc */
.item-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

@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);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 16px 10px 80px;
    }

    .step {
        padding: 20px 14px;
    }

    .header h1 {
        font-size: 22px;
    }

    .likert-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .likert-buttons {
        align-self: flex-end;
    }

    .scale-header .sh-text {
        display: none;
    }
}