:root {
    /* Tet 2026 - Vietnamese New Year Theme */
    --primary-color: #008f47;
    --primary-dark: #006b35;
    --primary-light: #00b359;
    --tet-green: #008f47;
    --tet-gold: #ffd700;
    --tet-red: #dc143c;
    --tet-yellow: #ffeb3b;
    --secondary-color: #00a651;
    --accent-gold: #ffd700;
    --accent-red: #dc143c;
    --background: #0a1f0a;
    --surface: #1a3a1a;
    --surface-light: #2a4a2a;
    --text-primary: #f0fff0;
    --text-secondary: #c8e6c8;
    --text-muted: #a0d0a0;
    --success: #00b359;
    --border: #2a4a2a;
    --shadow: rgba(0, 143, 71, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.7);
    --gradient: linear-gradient(135deg, #008f47 0%, #00b359 50%, #00d66b 100%);
    --gradient-gold: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    --tet-gradient: linear-gradient(135deg, #008f47 0%, #00a651 50%, #00b359 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 143, 71, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 179, 89, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 60% 40%, rgba(0, 166, 81, 0.1) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '🎋';
    position: fixed;
    font-size: 200px;
    opacity: 0.03;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none !important;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-48%, -52%) rotate(5deg); }
    75% { transform: translate(-52%, -48%) rotate(-5deg); }
}

body.fullscreen {
    padding: 40px;
}

body.fullscreen .container {
    max-width: 1200px;
}

.controls-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    pointer-events: none;
}

.controls-bar > * {
    pointer-events: auto;
}

.control-btn {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 4px 12px var(--shadow);
    pointer-events: auto;
    position: relative;
    z-index: 1001;
    text-decoration: none;
    border: none;
}

.control-btn:hover {
    background: var(--surface-light);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow);
}

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

.lang-icon, .fullscreen-icon {
    font-size: 1.1rem;
}

.lang-flag {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
    margin: 0;
}

.control-btn:has(.lang-flag) {
    padding: 10px 12px;
    min-width: 44px;
    justify-content: center;
}

/* Home button with icon only */
.home-btn {
    padding: 10px 12px;
    min-width: 44px;
    justify-content: center;
}

.home-btn .lang-icon {
    margin: 0;
    font-size: 1.3rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in;
}

.home-container {
    max-width: 1400px;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    font-size: clamp(2rem, 5vw, 3rem);
    -webkit-text-fill-color: initial;
    animation: tetPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(0, 143, 71, 0.5));
}

@keyframes tetPulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 10px rgba(0, 143, 71, 0.5));
    }
    50% { 
        transform: scale(1.1) rotate(5deg);
        filter: drop-shadow(0 0 20px rgba(0, 143, 71, 0.8));
    }
}

.subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 300;
}

/* Removed tabs - no longer needed */

.tab-content {
    display: none;
    animation: slideIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.card {
    background: var(--surface);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px var(--shadow-lg);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px var(--shadow-lg);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.input-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.input-wrapper {
    flex: 1;
    min-width: 150px;
}

.input-wrapper.full-width {
    flex: 1 1 100%;
}

.input-wrapper label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-wrapper input[type="number"],
.input-wrapper textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-wrapper input[type="number"]:focus,
.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 143, 71, 0.1);
}

.input-wrapper textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.file-import-container {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.link-text {
    color: var(--tet-green);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
    padding: 2px 0;
}

.link-text:hover {
    color: var(--tet-gold);
    border-bottom-color: var(--tet-gold);
    text-decoration: none;
}

.link-separator {
    color: var(--text-secondary);
    font-size: 0.9rem;
    user-select: none;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-end;
    padding-bottom: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--tet-green);
}

.generate-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--tet-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 143, 71, 0.4);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    z-index: 10;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 143, 71, 0.6);
}

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

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

.generate-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

.result-container {
    margin-top: 25px;
    padding: 25px;
    background: var(--background);
    border-radius: 12px;
    border: 2px solid var(--border);
    min-height: 100px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.result-placeholder {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    width: 100%;
}

.result-item {
    background: var(--tet-gradient);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    animation: popIn 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 143, 71, 0.4);
    min-width: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Step Container */
.step-container {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.step-container.active {
    display: block;
}

/* Navigation Buttons at Bottom */
.navigation-bottom-container {
    margin-top: 40px;
    padding: 20px 0;
    position: sticky;
    bottom: 20px;
    z-index: 10;
}

.navigation-buttons-bottom {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.back-to-step2-bottom-btn {
    flex: 1;
    min-width: 200px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.next-prize-btn {
    flex: 1;
    min-width: 200px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-step2-bottom-btn {
    background: var(--surface);
    border: 2px solid var(--tet-green);
    color: var(--tet-green);
}

.back-to-step2-bottom-btn:hover {
    background: var(--tet-green);
    color: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 143, 71, 0.5);
}

.next-prize-btn {
    background: var(--tet-gradient);
    color: white;
}

.next-prize-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 143, 71, 0.6);
}

/* Prize Select Dropdown */
.prize-select {
    width: 100%;
    padding: 14px 18px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    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='%23008f47' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

.prize-select:focus {
    outline: none;
    border-color: var(--tet-green);
    box-shadow: 0 0 0 3px rgba(0, 143, 71, 0.1);
}

.prize-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Card */
.results-card {
    margin-top: 30px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item-card {
    background: var(--background);
    border: 2px solid var(--tet-green);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

.result-item-card:hover {
    box-shadow: 0 4px 15px rgba(0, 143, 71, 0.3);
    transform: translateX(5px);
    border-color: var(--tet-gold);
}

.result-prize {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--tet-gold);
    flex: 1;
}

.result-winners {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 2;
    justify-content: flex-end;
}

.result-winner-item {
    background: var(--tet-gradient);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 143, 71, 0.3);
}

/* Error Message */
.error-card {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in;
    border: 2px solid #dc143c;
    background: var(--surface);
}

.error-display {
    text-align: center;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.error-icon {
    font-size: 3rem;
}

.error-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #dc143c;
    line-height: 1.6;
}

/* Winner Display */
.winner-card {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in;
}

.winner-display {
    text-align: center;
    padding: 30px;
    background: var(--background);
    border-radius: 15px;
    border: 2px solid var(--tet-green);
    margin-bottom: 20px;
}

.winner-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.winner-name {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--tet-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: popIn 0.5s ease;
}

.winner-id {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--tet-green);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
    animation: popIn 0.5s ease 0.2s both;
}

.winner-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.action-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.scan-again-btn {
    background: var(--surface);
    border: 2px solid var(--tet-green);
    color: var(--tet-green);
}

.scan-again-btn:hover {
    background: var(--tet-green);
    color: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 143, 71, 0.4);
}

.result-btn {
    background: var(--tet-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 143, 71, 0.4);
}

.result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 143, 71, 0.6);
}

.prize-name-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.current-prize-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tet-gold);
    text-align: center;
}

.current-prize-worth {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--tet-green);
    text-align: center;
    font-style: italic;
}

.navigation-card {
    margin-top: 30px;
}

.navigation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.back-to-step2-btn, .next-prize-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.back-to-step2-btn {
    background: var(--surface);
    border: 2px solid var(--tet-green);
    color: var(--tet-green);
}

.back-to-step2-btn:hover {
    background: var(--tet-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 143, 71, 0.4);
}

.next-prize-btn {
    background: var(--tet-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 143, 71, 0.4);
}

.next-prize-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 143, 71, 0.6);
}

.back-btn {
    margin-top: 30px;
    background: var(--surface);
    border: 2px solid var(--tet-green);
    color: var(--tet-green);
}

.back-btn:hover {
    background: var(--tet-green);
    color: white;
}

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

.scan-again-btn[style*="display: none"] {
    display: none !important;
}

.result-btn[style*="display: none"] {
    display: none !important;
}

/* Rolling Animation Styles */
.rolling-container {
    margin-top: 30px;
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    position: relative;
    z-index: 2;
    width: 100%;
    overflow: visible;
    box-sizing: border-box;
}

.rolling-display {
    text-align: center;
    padding: 50px;
    background: var(--surface);
    border-radius: 20px;
    border: 3px solid var(--tet-green);
    box-shadow: 0 0 40px rgba(0, 143, 71, 0.6), inset 0 0 30px rgba(0, 179, 89, 0.2);
    position: relative;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.rolling-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 143, 71, 0.1), transparent);
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.prize-name-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.prize-name-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--tet-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

.prize-worth-display {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--tet-green);
    text-align: center;
    font-style: italic;
    opacity: 0.9;
}

.rolling-number-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.rolling-digit {
    min-width: 70px;
    width: auto;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--tet-green);
    border: 3px solid var(--tet-green);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 143, 71, 0.5);
    position: relative;
    overflow: hidden;
    background: var(--background);
    text-shadow: 0 0 15px rgba(0, 143, 71, 0.8);
    animation: digitPulse 0.1s linear infinite;
    padding: 0 12px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.rolling-char {
    min-width: 55px;
    width: auto;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--tet-green);
    border: 3px solid var(--tet-green);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 143, 71, 0.5);
    position: relative;
    overflow: hidden;
    background: var(--background);
    text-shadow: 0 0 15px rgba(0, 143, 71, 0.8);
    animation: digitPulse 0.1s linear infinite;
    padding: 0 10px;
    flex-shrink: 0;
    box-sizing: border-box;
}

@keyframes digitPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 143, 71, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(0, 143, 71, 0.8);
    }
}

.rolling-digit::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 143, 71, 0.3) 50%, transparent 100%);
    animation: digitShine 0.3s linear infinite;
}

@keyframes digitShine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.rolling-label {
    font-size: 1.5rem;
    color: var(--tet-green);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: pulse 1.5s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Result Display */
.result-container {
    margin-top: 30px;
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    position: relative;
    z-index: 1;
}

.result-display {
    text-align: center;
    padding: 40px;
    background: var(--surface);
    border-radius: 20px;
    border: 3px solid var(--dragon-gold);
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.6);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in;
}

.result-prize-name {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dragon-gold);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.result-winner {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--dragon-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 20px;
    animation: popIn 0.5s ease;
}

.result-container.hidden {
    display: none !important;
}

.container {
    position: relative;
    z-index: 1;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer a {
    transition: all 0.3s ease;
    color: var(--tet-gold);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .controls-bar {
        top: 10px;
        right: 10px;
        flex-direction: column;
    }

    .control-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .fullscreen-text {
        display: none;
    }

    .prizes-grid {
        grid-template-columns: 1fr;
    }

    .rolling-display {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .rolling-number-container {
        gap: 8px;
    }
    
    .rolling-digit, .rolling-char {
        min-width: 45px;
        height: 90px;
        font-size: 2.5rem;
        padding: 0 8px;
    }
    
    .winner-name {
        font-size: 2rem;
    }
    
    .winner-id {
        font-size: 1.4rem;
    }
    
    .winner-actions {
        flex-direction: column;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }
    
    .current-prize-name {
        font-size: 1.2rem;
    }
    
    .current-prize-worth {
        font-size: 1rem;
    }
    
    .prize-name-display {
        font-size: 1.5rem;
    }
    
    .prize-worth-display {
        font-size: 1.1rem;
    }
    
    .navigation-bottom-container {
        position: relative;
        bottom: auto;
        margin-top: 30px;
        padding: 15px 0;
    }
    
    .navigation-buttons-bottom {
        flex-direction: column;
    }
    
    .back-to-step2-bottom-btn, .next-prize-btn {
        width: 100%;
        min-width: auto;
    }
    
    .navigation-buttons-bottom {
        flex-direction: row;
    }
    
    .next-prize-btn[style*="display: none"] {
        display: none !important;
    }
    
    .result-item-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .result-winners {
        width: 100%;
        justify-content: flex-start;
    }

    .prize-name-display {
        font-size: 1.5rem;
    }

    .header {
        margin-bottom: 30px;
    }

    .card {
        padding: 20px;
        border-radius: 16px;
    }

    .input-group {
        flex-direction: column;
        gap: 15px;
    }

    .input-wrapper {
        min-width: 100%;
    }

    .checkbox-wrapper {
        padding-bottom: 0;
    }


    .result-item {
        font-size: 1rem;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }

    .title-icon {
        font-size: 1.8rem;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .generate-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* Dark mode support (already dark by default, but ensures consistency) */
@media (prefers-color-scheme: light) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --text-primary: #f1f5f9;
    }
}

/* Welcome Screen - Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 40px 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.game-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px var(--shadow-lg);
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    z-index: 1;
}

.game-card > * {
    position: relative;
    z-index: 2;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 143, 71, 0.1), transparent);
    animation: rotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

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

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(0, 143, 71, 0.4);
    border-color: var(--tet-green);
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tet-gold);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
    min-height: 60px;
}

.game-btn {
    width: 100%;
    padding: 15px 30px;
    background: var(--tet-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(0, 143, 71, 0.3);
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 143, 71, 0.5);
    background: linear-gradient(135deg, #00b359 0%, #00d66b 50%, #00e673 100%);
}

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

@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
    
    .game-card {
        padding: 30px 20px;
    }
    
    .game-icon {
        font-size: 3rem;
    }
    
    .game-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-card {
        padding: 30px 20px;
    }
    
    .game-icon {
        font-size: 3rem;
    }
    
    .game-title {
        font-size: 1.2rem;
    }
}

/* Game 2: Quiz Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Question Input Form */
.question-item {
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.question-item:hover {
    border-color: var(--tet-green);
    box-shadow: 0 4px 15px rgba(0, 143, 71, 0.2);
}

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

.question-item-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--tet-gold);
    margin: 0;
}

.remove-question-btn {
    padding: 8px 16px;
    background: rgba(220, 20, 60, 0.2);
    border: 2px solid var(--tet-red);
    border-radius: 8px;
    color: var(--tet-red);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.remove-question-btn:hover {
    background: var(--tet-red);
    color: white;
    transform: translateY(-2px);
}

.answers-input-group {
    margin-top: 20px;
}

.answer-radio-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--tet-green);
    user-select: none;
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--tet-green);
}

.radio-label:hover {
    color: var(--tet-gold);
}

.question-text-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.question-text-input:focus {
    outline: none;
    border-color: var(--tet-green);
    box-shadow: 0 0 0 3px rgba(0, 143, 71, 0.1);
}

@media (max-width: 768px) {
    .question-item {
        padding: 20px 15px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .remove-question-btn {
        width: 100%;
    }
    
    .answer-radio-wrapper {
        min-width: auto;
        width: 100%;
        justify-content: flex-start;
    }
    
    .input-group {
        flex-direction: column;
    }
}

.question-number {
    text-align: center;
    font-size: 1.2rem;
    color: var(--tet-gold);
    font-weight: 600;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.4;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.answer-option {
    background: var(--surface);
    border: 3px solid var(--border);
    border-radius: 12px;
    padding: 20px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.answer-option:hover {
    border-color: var(--tet-green);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 143, 71, 0.3);
}

.answer-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.answer-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.answer-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    font-family: inherit;
}

.back-btn-small {
    background: var(--surface);
    border: 2px solid var(--tet-green);
    color: var(--tet-green);
}

.back-btn-small:hover {
    background: var(--tet-green);
    color: var(--background);
}

.next-btn-small {
    background: var(--tet-gradient);
    color: white;
}

.next-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 143, 71, 0.4);
}

.answer-option.blinking {
    animation: blink 0.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.02);
    }
}

.answer-option.correct-answer {
    background: rgba(0, 179, 89, 0.2);
    border-color: var(--success);
    color: var(--success);
    animation: correctPulse 0.5s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.answer-option.wrong-answer {
    background: rgba(220, 20, 60, 0.2);
    border-color: var(--tet-red);
    color: var(--tet-red);
    animation: wrongShake 0.5s ease;
    cursor: not-allowed;
}

.answer-option:not(.correct-answer):not(.wrong-answer) {
    cursor: pointer;
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.back-to-welcome-btn {
    background: var(--surface);
    border: 2px solid var(--tet-green);
    color: var(--tet-green);
}

.back-to-welcome-btn:hover {
    background: var(--tet-green);
    color: var(--background);
}

@media (max-width: 768px) {
    .question-text {
        font-size: 1.4rem;
    }
    
    .answer-text {
        font-size: 1rem;
    }
    
    .quiz-navigation {
        flex-direction: column;
    }
    
    .answer-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .answer-btn {
        width: 100%;
    }
}

/* Game 3: Money Division Styles */
.prize-amount-display {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tet-gold);
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    border: 2px solid var(--tet-gold);
}

.amount-value {
    font-size: 2rem;
    color: var(--tet-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.prize-amount-display-rolling {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--tet-gold);
    text-align: center;
    margin-top: 10px;
}

.winner-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tet-gold);
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

@media (max-width: 768px) {
    .prize-amount-display {
        font-size: 1.2rem;
    }
    
    .amount-value {
        font-size: 1.5rem;
    }
    
    .winner-amount {
        font-size: 1.2rem;
    }
}

/* Game 2: Mode Selection */
.mode-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.mode-btn {
    flex: 1;
    padding: 15px 25px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.mode-btn:hover {
    border-color: var(--tet-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 143, 71, 0.3);
}

.mode-btn.active {
    background: var(--tet-gradient);
    color: white;
    border-color: var(--tet-green);
    box-shadow: 0 4px 15px rgba(0, 143, 71, 0.4);
}

.input-mode {
    margin-top: 20px;
}



/* Fireworks Animation */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: firework 1s ease-out forwards;
}

.firework:nth-child(1) {
    top: 20%;
    left: 20%;
    background: var(--tet-gold);
    animation-delay: 0s;
}

.firework:nth-child(2) {
    top: 30%;
    left: 80%;
    background: var(--tet-red);
    animation-delay: 0.2s;
}

.firework:nth-child(3) {
    top: 60%;
    left: 50%;
    background: var(--tet-green);
    animation-delay: 0.4s;
}

.firework:nth-child(4) {
    top: 40%;
    left: 10%;
    background: var(--tet-gold);
    animation-delay: 0.6s;
}

.firework:nth-child(5) {
    top: 70%;
    left: 90%;
    background: var(--tet-red);
    animation-delay: 0.8s;
}

@keyframes firework {
    0% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 
            0 0 0 0 var(--tet-gold),
            0 0 0 0 var(--tet-red),
            0 0 0 0 var(--tet-green);
    }
    50% {
        transform: scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(3);
        opacity: 0;
        box-shadow: 
            -50px -50px 0 10px var(--tet-gold),
            50px -50px 0 10px var(--tet-red),
            -50px 50px 0 10px var(--tet-green),
            50px 50px 0 10px var(--tet-gold),
            0 -70px 0 10px var(--tet-red),
            0 70px 0 10px var(--tet-green),
            -70px 0 0 10px var(--tet-gold),
            70px 0 0 10px var(--tet-red);
    }
}

/* Clapping Animation */
.clapping-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    z-index: 10000;
    pointer-events: none;
    animation: clapPulse 2s ease-out forwards;
    text-shadow: 0 0 20px var(--tet-gold);
}

@keyframes clapPulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    60% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .mode-selection {
        flex-direction: column;
    }
    
    .clapping-animation {
        font-size: 3rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--tet-green);
    outline-offset: 2px;
}

/* Fullscreen mode adjustments */
body.fullscreen .controls-bar {
    top: 30px;
    right: 30px;
}

body.fullscreen .header {
    margin-bottom: 50px;
}

body.fullscreen .card {
    padding: 40px;
}

body.fullscreen .result-item {
    font-size: 1.5rem;
    padding: 16px 28px;
}
