:root {
    /* UNO Card Colors */
    --red-dark: #cc0000;
    --red-light: #ff4d4d;
    --blue-dark: #0033cc;
    --blue-light: #4d79ff;
    --green-dark: #00cc00;
    --green-light: #4dff4d;
    --yellow-dark: #cccc00;
    --yellow-light: #ffff4d;
    --wild-dark: #222;
    --wild-light: #444;

    /* Squid Game Theme */
    --squid-red: #ff0000;
    --squid-pink: #ff0077;
    --squid-dark: #111;
    --squid-light: #222;
    --squid-border: #f00;
    --squid-glow: 0 0 10px rgba(255, 0, 0, 0.7);
    
    /* Typography */
    --font-main: 'Arial', sans-serif;
    --font-size-large: 3rem;
    --font-size-medium: 1.5rem;
    
    /* Spacing */
    --card-width: 100px;
    --card-height: 150px;
}

/* Mobile Variables */
@media (max-width: 768px) {
    :root {
        --card-width: 60px;
        --card-height: 90px;
        --font-size-large: 2rem;
    }
}/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #111;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #300, #111);
    z-index: 10;
}

.container {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid #f00;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

h1, h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 0 10px #f00, 0 0 20px #f00;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ccc;
}

/* Button Styles */
.glow-btn {
    background: linear-gradient(145deg, #f00, #900);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.glow-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

/* Email Screen */
#email-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#player-email {
    padding: 15px;
    font-size: 1.2rem;
    width: 100%;
    max-width: 400px;
    margin-bottom: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid #f00;
    color: white;
    border-radius: 5px;
}

/* Rules Screen */
.rules-content {
    text-align: left;
    margin: 2rem auto;
    max-width: 600px;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-left: 3px solid #f00;
}

.rules-content ol {
    padding-left: 2rem;
}

.rules-content li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #ddd;
}

/* Game Screen */
#game-screen {
    z-index: 5;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.timer {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: #f00;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.7);
}


.ai-hand, .player-hand {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    min-height: 120px;
}

.play-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin: 20px 0;
}

.deck, .discard {
    width: 100px;
    height: 150px;
    position: relative;
}

/* Card Styles */
.card {
    width: 100px;
    height: 150px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

/* Card Colors */
.card.red {
    background: linear-gradient(135deg, #ff4d4d, #cc0000);
    color: white;
}

.card.blue {
    background: linear-gradient(135deg, #4d79ff, #0033cc);
    color: white;
}

.card.green {
    background: linear-gradient(135deg, #4dff4d, #00cc00);
    color: white;
}

.card.yellow {
    background: linear-gradient(135deg, #ffff4d, #cccc00);
    color: #333;
}

/* Wild Card Specific Styles */
.card.wild {
    background: linear-gradient(135deg, #111, #000);
    border: 2px solid #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.wild-text {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.draw4-text {
    font-size: 1rem;
    font-weight: normal;
}

/* Special animation for wild cards */
.card.wild.card-played {
    animation: wildCardPlay 0.5s ease-in-out;
}

@keyframes wildCardPlay {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px #fff; }
    100% { transform: scale(1); }
}
.card.back {
    background: linear-gradient(135deg, #ff0000, #990000);
    color: white;
    border: 2px solid #fff;
}

/* End Screen */
.time-taken {
    font-size: 1.5rem;
    margin: 1rem 0;
    color: #f00;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    h1, h2 {
        font-size: 2rem;
    }
    
    .card {
        width: 60px;
        height: 90px;
        font-size: 1.5rem;
    }
    
    .deck, .discard {
        width: 60px;
        height: 90px;
    }
    
    .play-area {
        gap: 20px;
    }
}

/* Animations */
@keyframes cardPlay {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.card-played {
    animation: cardPlay 0.5s ease-in-out;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Color Selection Popup - Mobile Responsive */
#color-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.color-popup-content {
    background: linear-gradient(145deg, #222, #000);
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid #f00;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.color-popup-content h3 {
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 0 5px #f00;
    font-size: 1.5rem;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    justify-items: center;
}

.color-option {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 3px solid white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: rgba(255,255,255,0.8);
    text-shadow: 0 0 3px #000;
}

/* Color-specific styles */
.color-option.red { background-color: #ff4444; }
.color-option.blue { background-color: #4444ff; }
.color-option.green { background-color: #44ff44; color: #333; text-shadow: 0 0 3px #fff;}
.color-option.yellow { background-color: #ffff44; color: #333; text-shadow: 0 0 3px #fff;}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

/* Mobile-specific adjustments */
@media (max-width: 480px) {
    .color-popup-content {
        padding: 1rem;
    }
    
    .color-option {
        width: 70px;
        height: 70px;
        font-size: 0.9rem;
    }
    
    .color-popup-content h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 350px) {
    .color-option {
        width: 60px;
        height: 60px;
    }
}

/* AI Color Selection Display - Mobile Responsive */
.ai-color-selection {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 2px solid #f00;
    font-size: 1.2rem;
    font-weight: bold;
    z-index: 1000;
    animation: fadeInOut 2s ease-in-out;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
    line-height: 1.4;
}

/* Color-specific text colors */
.ai-color-selection[data-color="red"] { color: #ff4444; }
.ai-color-selection[data-color="blue"] { color: #4444ff; }
.ai-color-selection[data-color="green"] { color: #44ff44; }
.ai-color-selection[data-color="yellow"] { 
    color: #ffff44; 
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .ai-color-selection {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
        border-width: 1px;
    }
}

@media (max-width: 400px) {
    .ai-color-selection {
        font-size: 0.9rem;
        max-width: 90%;
    }
}

/* AI Thinking Indicator */
.ai-thinking {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #f00;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2rem;
    z-index: 100;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

/* Enhanced AI Color Selection */
.ai-color-selection {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #f00;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    z-index: 1000;
    max-width: 80%;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: popIn 0.3s ease-out;
}

.ai-selection-title {
    color: white;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px #f00;
}

.ai-selection-color {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 5px;
    text-transform: uppercase;
}

.ai-selection-color.red { color: #ff4444; background: rgba(255, 68, 68, 0.2); }
.ai-selection-color.blue { color: #4444ff; background: rgba(68, 68, 255, 0.2); }
.ai-selection-color.green { color: #44ff44; background: rgba(68, 255, 68, 0.2); }
.ai-selection-color.yellow { color: #ffff44; background: rgba(255, 255, 68, 0.2); }

.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

/* AI Draw Message */
.ai-draw-message {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ccc;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 1rem;
    z-index: 100;
}

/* Animations */
@keyframes popIn {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .ai-thinking, .ai-draw-message {
        font-size: 1rem;
        top: 15%;
    }
    
    .ai-color-selection {
        padding: 0.8rem;
        max-width: 90%;
    }
    
    .ai-selection-title {
        font-size: 0.9rem;
    }
    
    .ai-selection-color {
        font-size: 1.2rem;
    }
}
.color-indicator {
    width: 30px;
    height: 30px;
    transform: rotate(45deg);
    margin-top: 10px;
    border: 2px solid white;
    background-color: transparent;
    transition: background-color 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Position diamond between deck and discard */
.play-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .color-indicator {
        width: 20px;
        height: 20px;
    }

    .play-area {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .color-indicator {
        width: 16px;
        height: 16px;
    }
}
