* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Londrina Solid', sans-serif;
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    color: white;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #8a1253; /* Rosa escuro */
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 500px;
    max-height: 800px;
    overflow: hidden;
    background-color: #8a1253; /* Rosa escuro */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #8a1253; /* Rosa escuro */
    background-image: radial-gradient(circle, rgba(255, 192, 203, 0.2) 10%, transparent 10%),
                      radial-gradient(circle, rgba(255, 192, 203, 0.15) 10%, transparent 10%);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.hidden {
    display: none;
    opacity: 0;
    z-index: -1;
}

h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
    color: white;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.8), 0 0 20px rgba(255, 105, 180, 0.5);
    animation: titleGlow 3s infinite alternate;
}

@keyframes titleGlow {
    0% {
        text-shadow: 0 0 10px rgba(255, 105, 180, 0.8), 0 0 20px rgba(255, 105, 180, 0.5);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 105, 180, 1), 0 0 30px rgba(255, 20, 145, 0.8), 0 0 45px rgba(255, 20, 145, 0.4);
        transform: scale(1.05);
    }
    100% {
        text-shadow: 0 0 10px rgba(255, 105, 180, 0.8), 0 0 20px rgba(255, 105, 180, 0.5);
        transform: scale(1);
    }
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: white;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.8);
}

p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
    max-width: 80%;
}

.btn {
    background: linear-gradient(to bottom, #ff69b4, #c71585);
    color: white;
    border: none;
    padding: 15px 30px;
    margin: 10px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 105, 180, 0.5);
    transition: all 0.2s ease;
    font-family: 'Londrina Solid', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(30deg);
    transition: transform 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 105, 180, 0.7);
}

.btn:hover::after {
    transform: rotate(30deg) translate(50%, 50%);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#instructions-screen {
    justify-content: flex-start;
    overflow-y: auto;
}

.instructions-content {
    background-color: rgba(138, 18, 83, 0.8);
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0 20px 0;
    max-width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.5);
    border: 2px solid rgba(255, 105, 180, 0.5);
}

.instructions-content p, .instructions-content ul {
    text-align: left;
    margin-bottom: 15px;
}

.instructions-content ul {
    padding-left: 20px;
}

.instructions-content li {
    margin-bottom: 8px;
}

#game-screen {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
}

#opponent-info, #player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 25%;
}

#opponent-name, #player-name {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(255, 105, 180, 0.8);
}

#opponent-cards, #player-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 120px;
    width: 100%;
    overflow-x: auto;
    padding: 5px;
}

#game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50%;
    position: relative;
}

#deck-area {
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
    height: 150px;
}

.card-pile {
    width: 100px;
    height: 150px;
    border-radius: 10px;
    margin: 0 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

#draw-pile {
    background-image: url('https://firebasestorage.googleapis.com/v0/b/sticky-20bca.appspot.com/o/sgm-asset%2F7e80c2d0-b571-4dcd-a39e-07275d7ca9fd%2F738e4915-a5f2-4e04-8029-307f527fa6d5.png?alt=media&token=346f2e96-28f1-423f-a885-c8cbf24df1b5');
    background-size: cover;
    cursor: pointer;
}

#discard-pile {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.card {
    width: 80px;
    height: 120px;
    border-radius: 10px;
    margin: 0 -10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card.back {
    background-image: url('https://firebasestorage.googleapis.com/v0/b/sticky-20bca.appspot.com/o/sgm-asset%2F7e80c2d0-b571-4dcd-a39e-07275d7ca9fd%2F738e4915-a5f2-4e04-8029-307f527fa6d5.png?alt=media&token=346f2e96-28f1-423f-a885-c8cbf24df1b5');
    background-size: cover;
}

.card.red {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.card.blue {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
}

.card.green {
    background: linear-gradient(135deg, #56ab2f, #a8e063);
}

.card.yellow {
    background: linear-gradient(135deg, #f7971e, #ffd200);
}

.card.wild {
    background: linear-gradient(135deg, #ff416c, #2193b0, #56ab2f, #f7971e);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
}

.card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
    transform: rotate(30deg);
    animation: cardGlitter 6s infinite linear;
    pointer-events: none;
}

@keyframes cardGlitter {
    0% {
        transform: rotate(30deg) translate(-100%, -100%);
    }
    100% {
        transform: rotate(30deg) translate(100%, 100%);
    }
}

.card:hover {
    transform: translateY(-10px);
    z-index: 2;
}

.card-symbol {
    font-size: 2rem;
    margin-bottom: 5px;
}

.card-value {
    font-size: 1.5rem;
}

#turn-indicator {
    font-size: 1.2rem;
    margin: 15px 0;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
}

#uno-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 10px 20px;
    background: linear-gradient(to bottom, #ff0066, #bc0052);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 0, 102, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 0, 102, 0.9);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 0, 102, 0.7);
    }
}

#question-screen {
    background-color: rgba(138, 18, 83, 0.95);
    z-index: 20;
}

#question-container {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.7);
    border: 2px solid rgba(255, 105, 180, 0.5);
    position: relative;
    animation: questionGlow 2s infinite alternate;
}

@keyframes questionGlow {
    0% {
        box-shadow: 0 0 20px rgba(255, 105, 180, 0.7);
    }
    100% {
        box-shadow: 0 0 30px rgba(255, 105, 180, 1), 0 0 50px rgba(255, 20, 145, 0.5);
    }
}

#question-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
}

#options-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.option::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(30deg) translateX(-100%);
    animation: optionShine 3s infinite;
}

@keyframes optionShine {
    0% {
        transform: rotate(30deg) translateX(-100%);
    }
    20%, 100% {
        transform: rotate(30deg) translateX(100%);
    }
}

.option:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.option.correct {
    background-color: rgba(46, 204, 113, 0.7);
}

.option.incorrect {
    background-color: rgba(231, 76, 60, 0.7);
}

#timer {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #8a1253;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.7);
}

#color-selection {
    background-color: rgba(138, 18, 83, 0.95);
    z-index: 20;
}

#color-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.color-option {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option[data-color="red"] {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.color-option[data-color="blue"] {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
}

.color-option[data-color="green"] {
    background: linear-gradient(135deg, #56ab2f, #a8e063);
}

.color-option[data-color="yellow"] {
    background: linear-gradient(135deg, #f7971e, #ffd200);
}

#game-over-screen {
    background-color: rgba(138, 18, 83, 0.95);
    z-index: 30;
}

#final-score {
    font-size: 1.5rem;
    margin: 20px 0;
    text-align: center;
}

.winner-text-animation {
    animation: winnerPulse 1s infinite alternate;
    text-shadow: 0 0 20px rgba(255, 105, 180, 1), 0 0 30px rgba(255, 20, 145, 0.8), 0 0 40px rgba(255, 20, 145, 0.6);
    font-size: 3rem !important;
    color: #ffb6c1;
}

@keyframes winnerPulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 20px rgba(255, 105, 180, 1), 0 0 30px rgba(255, 20, 145, 0.8);
    }
    100% {
        transform: scale(1.1);
        text-shadow: 0 0 30px rgba(255, 105, 180, 1), 0 0 40px rgba(255, 20, 145, 1), 0 0 50px rgba(255, 20, 145, 0.8);
    }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    border-radius: 0;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

.split-text-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 1000;
}

.split-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #8a1253;
    background: #ffb6c1;
    padding: 20px 40px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease;
}

.split-text.animate {
    animation: split-text 1.5s forwards;
}

@keyframes split-text {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    20% {
        transform: scale(1.2);
        opacity: 1;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    60% {
        transform: scale(1);
        opacity: 1;
    }
    80% {
        transform: scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: scale(0.5) rotateZ(10deg);
        opacity: 0;
        clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    }
}

/* Glitter effect */
.screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="rgba(255,192,203,0.5)"/><circle cx="30" cy="40" r="0.8" fill="rgba(255,192,203,0.5)"/><circle cx="50" cy="20" r="1.2" fill="rgba(255,192,203,0.5)"/><circle cx="70" cy="70" r="0.6" fill="rgba(255,192,203,0.5)"/><circle cx="90" cy="30" r="1" fill="rgba(255,192,203,0.5)"/><circle cx="20" cy="80" r="0.7" fill="rgba(255,192,203,0.5)"/><circle cx="60" cy="50" r="1.1" fill="rgba(255,192,203,0.5)"/><circle cx="80" cy="90" r="0.9" fill="rgba(255,192,203,0.5)"/></svg>');
    pointer-events: none;
    opacity: 0.7;
    z-index: -1;
    animation: sparkle 10s linear infinite;
}

@keyframes sparkle {
    0% {
        background-position: 0 0;
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        background-position: 100px 100px;
        opacity: 0.5;
    }
}

/* Responsive adjustments */
@media (max-height: 700px) {
    .card {
        width: 70px;
        height: 105px;
        font-size: 1.2rem;
    }
    
    .card-pile {
        width: 80px;
        height: 120px;
    }
    
    #opponent-info, #player-info {
        height: 22%;
    }
    
    #game-area {
        height: 56%;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 350px) {
    .card {
        width: 60px;
        height: 90px;
        font-size: 1rem;
        margin: 0 -15px;
    }
    
    .card-pile {
        width: 70px;
        height: 105px;
        margin: 0 10px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    #question-text {
        font-size: 1rem;
    }
}