/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #22c55e;
    --success-hover: #16a34a;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --error: #ef4444;
    --star-color: #fbbf24;
    --border-radius: 16px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

/* Card */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Icon */
.icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
}

/* Typography */
h1 {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
}

.subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

/* Input Group */
.input-group {
    margin-bottom: 24px;
}

input[type="text"] {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

input[type="text"]::placeholder {
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: normal;
}

/* Error */
.error {
    color: var(--error);
    font-size: 14px;
    text-align: center;
    margin-top: 12px;
    min-height: 20px;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-submit {
    background: var(--success);
    color: white;
}

.btn-submit:hover:not(:disabled) {
    background: var(--success-hover);
    transform: translateY(-1px);
}

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

/* Info Box */
.info-box {
    margin-top: 32px;
    padding: 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.info-box p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.info-box ul {
    list-style: none;
    color: var(--text-muted);
    font-size: 13px;
}

.info-box li {
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.info-box li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Shuffle Screen */
.shuffle-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 48px;
    margin-bottom: 24px;
}

.shuffle-arrows {
    animation: shuffle 1s ease-in-out infinite;
}

@keyframes shuffle {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.shuffle-instruction {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.5;
}

.question-preview {
    color: var(--text-muted);
    text-align: center;
    font-size: 14px;
    margin-bottom: 24px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 32px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
}

/* Question Text */
.question-text {
    font-size: 22px;
    line-height: 1.4;
    margin-bottom: 32px;
}

/* Star Rating */
.star-container {
    text-align: center;
    margin-bottom: 24px;
}

.stars {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 12px;
}

.star {
    font-size: 48px;
    color: var(--bg-input);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.star:hover {
    transform: scale(1.1);
}

.star.hover,
.star.active {
    color: var(--star-color);
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.rating-label {
    font-size: 16px;
    color: var(--text-secondary);
    min-height: 24px;
}

/* Text Input */
.text-container {
    margin-bottom: 24px;
}

textarea {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-family: inherit;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

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

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Complete Screen */
.complete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
}

.complete-message {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 16px;
}

.complete-note {
    color: var(--text-muted);
    text-align: center;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 520px) {
    .card {
        padding: 24px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .question-text {
        font-size: 18px;
    }

    .star {
        font-size: 40px;
    }

    .shuffle-animation {
        font-size: 36px;
    }
}
