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

body, html {
    font-family: 'Arial', sans-serif;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* Container Styles */
.raffle-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/bg-default.jpg') center/cover no-repeat;
    background-size: cover;
    z-index: -1;
    filter: brightness(0.7);
    transition: background-image 0.5s ease;
}

/* Header Styles */
header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.controls {
    display: flex;
    gap: 10px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn.primary {
    background: linear-gradient(135deg, #ff9472, #f2709c);
    color: white;
}

.btn.primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.btn.primary:active, 
.btn.primary.pressed {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn.secondary {
    background: rgb(237 75 72);
    color: white;
    backdrop-filter: blur(5px);
}

.btn.secondary:hover {
    background: rgba(255, 148, 114);
}

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

/* New Focused Raffle Styles */
.raffle-focus {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    min-height: 300px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Draw Button Container */
.draw-button-container {
    position: fixed;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.draw-btn {
    font-size: 1.5rem;
    padding: 15px 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.draw-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.keyboard-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.admin-link {
    position: fixed;
    top: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.admin-link:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: rotate(30deg);
}

/* Hidden Controls */
.hidden-controls {
    display: none;
}

/* Name Spinner Styles */
.name-spinner {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.name-placeholder {
    font-size: 2rem;
    color: #ddd;
    text-align: center;
}

.spinning-name {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.06s ease-out;
}

.spinning-name.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Winner Display Styles */
.winner-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 180px;
    padding: 30px 20px;
    background: transparent;
    border-radius: 15px;
    animation: winner-bg-pulse 2s infinite;
}

.congratulations-text {
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #FFD700;
    text-shadow: 
        0 0 10px rgba(255, 150, 0, 0.8),
        0 0 20px rgba(255, 100, 0, 0.5),
        3px 3px 0 rgba(0, 0, 0, 0.8);
    letter-spacing: 3px;
    animation: congratulations-pulse 2s infinite;
    z-index: 100;
    display: none; /* Hidden by default, will be shown via JS */
}

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

.winner-name {
    font-size: 5rem;
    font-weight: bold;
    text-align: center;
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(255, 150, 150, 0.8),
        0 0 20px rgba(255, 100, 100, 0.5),
        0 0 30px rgba(255, 50, 50, 0.3);
    word-break: break-word;
    max-width: 100%;
    animation: winner-pulse 2s infinite;
}

@keyframes winner-bg-pulse {
    0% { box-shadow: 0 0 0 0 rgba(242, 112, 156, 0.1); }
    50% { box-shadow: 0 0 0 30px rgba(242, 112, 156, 0); }
    100% { box-shadow: 0 0 0 0 rgba(242, 112, 156, 0); }
}

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

/* Confetti Animation */
.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.confetti-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.8;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(1000%) rotate(360deg);
        opacity: 0;
    }
}

/* Recent Winners Styles */
.recent-winners {
    width: 100%;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recent-winners h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
    color: #ff9472;
}

#winnersList {
    list-style-type: none;
    max-height: 300px;
    overflow-y: auto;
}

#winnersList li {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#winnersList li:hover {
    background: rgba(255, 255, 255, 0.05);
}

#winnersList li:last-child {
    border-bottom: none;
}

/* Footer Styles */
footer {
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sound-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ddd;
}

.sound-toggle input {
    width: 18px;
    height: 18px;
}

.status-indicator {
    color: #ddd;
    font-size: 0.9rem;
}

/* Admin Panel Styles */
.admin-container {
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

.admin-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 2rem;
}

.admin-content {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.card h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.admin-form input[type="text"], 
.admin-form select, 
.admin-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.admin-form input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.admin-form .checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.admin-form textarea {
    min-height: 200px;
    font-family: monospace;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, 
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    background-color: #f9f9f9;
    font-weight: bold;
}

.admin-table tr:hover {
    background-color: #f5f5f5;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .winner-name {
        font-size: 3rem;
    }
    
    .controls {
        width: 100%;
        justify-content: center;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .winner-name {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .admin-content {
        padding: 15px;
    }
    
    .admin-table th, 
    .admin-table td {
        padding: 8px;
    }
}
