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

:root {
    --primary-color: #c41e3a;
    --secondary-color: #165b33;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --danger-color: #dc3545;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.language-selector-wrapper {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-selector-wrapper label {
    font-size: 1.5rem;
}

.language-selector {
    padding: 6px 10px;
    border-radius: 6px;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector:hover {
    background: white;
}

.language-selector:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    margin-top: 25px;
    font-size: 1.3rem;
}

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

input[type="text"],
.couple-select {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
.couple-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

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

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

.btn-primary:hover:not(:disabled) {
    background-color: #a01729;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.btn-secondary:hover:not(:disabled) {
    background-color: #114726;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 1.2rem;
    margin-top: 10px;
}

.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-color);
    padding: 10px 15px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.participant-name {
    font-weight: 500;
}

.remove-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.3s;
}

.remove-btn:hover {
    background: #bd2130;
}

.couples-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.help-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.couples-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.couple-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #fff3e0;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #ffb74d;
}

.couple-text {
    flex: 1;
    font-weight: 500;
}

.draw-info {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 150px;
}

.draw-step {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.draw-step.current {
    background-color: #ffe4e9;
    border-left-color: var(--primary-color);
    animation: pulse 2s infinite;
}

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

@keyframes suspense {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(0.9);
    }
    75% {
        transform: scale(1.05);
    }
}

@keyframes reveal {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.giver {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.receiver {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.receiver.revealing {
    display: inline-block;
    animation: suspense 0.5s ease-in-out infinite;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.receiver.revealed {
    display: inline-block;
    animation: reveal 0.6s ease-out;
}

.draw-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.results-list {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.result-item {
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--success-color);
}

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }

    .header-top {
        flex-direction: column;
        gap: 10px;
    }

    .language-selector-wrapper {
        position: static;
        transform: none;
    }
    
    .card {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    input[type="text"],
    .couple-select {
        min-width: 100%;
    }
    
    .btn {
        width: 100%;
    }
}

/* Fullscreen Reveal Overlay */
/* High z-index (10000+) is needed to appear above the preview banner (z-index: 9999) */
.reveal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.reveal-content {
    text-align: center;
    color: white;
    z-index: 10001;
    position: relative;
}

.countdown-timer {
    font-size: 8rem;
    font-weight: bold;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

.reveal-text {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
    padding: 0 20px;
    animation: revealTextIn 0.6s ease-out;
}

@keyframes revealTextIn {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(50px);
    }
    50% {
        transform: scale(1.1) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10002;
}

/* Preview Banner - Mobile Responsive Styles */
@media (max-width: 640px) {
    #preview-banner > div {
        padding: 10px 12px !important;
        flex-wrap: wrap !important;
    }
    
    #preview-banner > div > div:first-of-type {
        font-size: 20px !important;
    }
    
    #preview-banner > div > div:nth-of-type(2) strong {
        font-size: 12px !important;
    }
    
    #preview-banner > div > div:nth-of-type(2) span {
        font-size: 11px !important;
    }
    
    #preview-banner-pr-link {
        padding: 6px 10px !important;
        font-size: 11px !important;
        order: 4;
        margin-top: 6px !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    body[style*="paddingTop"] {
        padding-top: 80px !important;
    }

    .countdown-timer {
        font-size: clamp(3rem, 15vw, 8rem);
    }

    .reveal-text {
        font-size: clamp(1.5rem, 5vw, 3rem);
    }
}
