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

:root {
    --wine: #722f37;
    --deep-wine: #5a1f26;
    --pink: #ff9ec5;
    --soft-pink: #ffb3d1;
    --rose: #ff6b9d;
    --glow: rgba(255, 182, 193, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Playfair Display', 'Georgia', serif;
    background: linear-gradient(135deg, var(--deep-wine) 0%, var(--wine) 50%, #8b3a4a 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    touch-action: none;
}

/* Romantic Headings */
.romantic-text {
    font-family: 'Dancing Script', cursive;
}

/* Rose Glow Decoration */
.rose-glow {
    position: fixed;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

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

/* Falling Love Emojis */
.love-emojis {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.love-emoji {
    position: absolute;
    font-size: 1.5rem;
    animation: fall linear infinite;
    opacity: 0.7;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Glassmorphism Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.romantic-text {
    color: var(--soft-pink);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px var(--glow);
    font-weight: 600;
    letter-spacing: 1px;
}

/* Heart Button */
.heart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.heart-button {
    font-size: 5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    animation: heartbeat 1.5s ease-in-out infinite;
    padding: 0.5rem;
    filter: drop-shadow(0 0 20px var(--glow));
}

.heart-button:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px var(--rose));
}

.heart-button:active {
    transform: scale(0.9);
}

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

.click-hint {
    color: var(--pink);
    font-size: 1rem;
}

/* Rules Screen */
.rules-content {
    margin: 2rem 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.rule-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 182, 193, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 182, 193, 0.2);
}

.rule-number {
    font-size: 1.5rem;
    margin: 0;
    flex-shrink: 0;
}

.rule-text {
    color: var(--soft-pink);
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* Answer Buttons */
.answer-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.answer-btn {
    padding: 1rem 2.5rem;
    font-size: 1.3rem;
    background: rgba(255, 182, 193, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 182, 193, 0.4);
    border-radius: 25px;
    color: var(--soft-pink);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    touch-action: manipulation;
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    letter-spacing: 1px;
}

.answer-btn:hover {
    background: rgba(255, 182, 193, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow);
}

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

/* Truth Input */
.truth-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--soft-pink);
    margin-bottom: 1rem;
    text-align: center;
}

.truth-input::placeholder {
    color: rgba(255, 182, 193, 0.5);
}

.truth-input:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 10px var(--glow);
}

.submit-btn {
    padding: 0.9rem 2.5rem;
    font-size: 1.1rem;
    background: rgba(255, 107, 157, 0.6);
    border: 2px solid rgba(255, 182, 193, 0.5);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: rgba(255, 107, 157, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow);
}

.error-message {
    color: var(--soft-pink);
    margin-top: 1.5rem;
    font-size: 1.3rem;
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    text-shadow: 0 0 10px var(--glow);
}

.retry-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    background: var(--wine);
    border: none;
    border-radius: 10px;
    color: var(--soft-pink);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    touch-action: manipulation;
}

.retry-btn:hover {
    background: var(--deep-wine);
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.controls-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.control-btn {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    background: rgba(255, 182, 193, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 182, 193, 0.3);
    border-radius: 20px;
    color: var(--soft-pink);
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
}

.control-btn:hover {
    background: rgba(255, 182, 193, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--glow);
}

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

.music-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-text {
    display: inline;
}

.hidden-input {
    display: none;
}

/* Photo Container */
.photo-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    padding-top: 80px; /* Space for top bar */
    touch-action: none;
}

/* Photo Cards */
.photo-card {
    position: absolute;
    cursor: grab;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease, opacity 0.6s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px var(--glow);
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border: 2px solid var(--glass-border);
    touch-action: none;
    user-select: none;
    will-change: transform, box-shadow;
    margin: 5px; /* Extra spacing between photos */
}

.photo-card:active {
    cursor: grabbing;
}

.photo-card.selected {
    border-color: var(--rose);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.6), 0 0 30px var(--glow);
    transform: scale(1.05);
    z-index: 10;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.photo-card.dragging {
    transition: none;
    z-index: 100;
}

/* Lyrics Container */
.lyrics-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    width: 600px;
    padding: 1.5rem 2rem;
    padding-top: 3rem; /* Extra space for toggle button */
    border-radius: 20px;
    z-index: 50;
    text-align: center;
    animation: fadeInUp 0.8s ease;
    display: block;
}

.language-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    z-index: 10;
}

.language-toggle:hover {
    background: rgba(255, 182, 193, 0.3);
    transform: scale(1.1);
    box-shadow: 0 5px 15px var(--glow);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.lyrics-text {
    color: var(--soft-pink);
    font-size: 1.2rem;
    line-height: 1.8;
    text-shadow: 0 0 15px var(--glow);
    min-height: 1.8em;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: 'Playfair Display', serif;
    font-weight: 500;
}

.lyrics-text.active {
    color: var(--rose);
    text-shadow: 0 0 15px var(--glow), 0 0 25px rgba(255, 107, 157, 0.5);
    transform: scale(1.05);
}

.lyrics-container.hidden {
    display: none;
}

/* Fullscreen Modal */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    padding: 2rem;
    overflow-y: auto;
}

.fullscreen-content {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    width: 100%;
    flex-wrap: wrap;
}

.fullscreen-content.has-letter-button {
    flex-direction: column;
}

.fullscreen-modal img {
    max-width: 60%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 50px var(--glow);
    flex: 1;
    min-width: 300px;
}

@media (max-width: 768px) {
    .fullscreen-content {
        flex-direction: column;
    }
    
    .fullscreen-modal img {
        max-width: 90%;
    }
}

.fullscreen-text {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    padding: 2rem;
    border-radius: 20px;
    max-height: 85vh;
    overflow-y: auto;
}

.fullscreen-text p {
    color: var(--soft-pink);
    font-size: 1.2rem;
    line-height: 1.8;
    text-shadow: 0 0 10px var(--glow);
    font-family: 'Playfair Display', serif;
    margin: 0;
    text-align: left;
}

.close-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--soft-pink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.close-fullscreen:hover {
    background: rgba(255, 182, 193, 0.3);
    transform: rotate(90deg);
}

/* Letter Button */
.letter-button {
    padding: 1.2rem 2.5rem;
    font-size: 1.5rem;
    font-family: 'Dancing Script', cursive;
    color: var(--soft-pink);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    box-shadow: 0 5px 20px var(--glow);
    touch-action: manipulation;
    z-index: 1001;
}

.letter-button:hover {
    background: rgba(255, 182, 193, 0.2);
    transform: scale(1.05);
    box-shadow: 0 8px 30px var(--glow);
}

/* Letter Modal */
.letter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.letter-modal.hidden {
    display: none;
}

/* Envelope Container */
.envelope-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

/* Envelope */
.envelope {
    position: absolute;
    width: 300px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
}

.envelope-body {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5dc 0%, #e8e8d8 100%);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(139, 69, 19, 0.3);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(135deg, #f5f5dc 0%, #e8e8d8 100%);
    border-radius: 10px 10px 0 0;
    transform-origin: top center;
    z-index: 11;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(139, 69, 19, 0.3);
    border-bottom: none;
    transform: rotateX(0deg);
}

.envelope-container.opening .envelope-flap {
    animation: envelopeOpen 1.5s ease forwards;
}

@keyframes envelopeOpen {
    0% {
        transform: rotateX(0deg);
    }
    100% {
        transform: rotateX(-180deg);
    }
}

/* Letter */
.letter {
    position: absolute;
    width: 280px;
    height: auto;
    min-height: 180px;
    background: linear-gradient(135deg, #fffef7 0%, #fff9e6 100%);
    border-radius: 5px;
    padding: 2rem;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(30px) scale(0.9);
    z-index: 15;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    max-height: 70vh;
    pointer-events: none;
    visibility: hidden;
}

.envelope-container.opening .letter {
    visibility: visible;
    animation: letterReveal 1.5s ease 1s forwards;
    pointer-events: auto;
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(-80px) scale(1);
    }
}

.letter-content {
    color: #5a1f26;
    font-family: 'Playfair Display', serif;
    line-height: 1.8;
}

.letter-text {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: left;
    color: #5a1f26;
}

.letter-signature {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    text-align: right;
    font-family: 'Dancing Script', cursive;
    color: var(--wine);
    font-weight: 600;
}

.close-letter-btn {
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-family: 'Dancing Script', cursive;
    background: rgba(255, 107, 157, 0.6);
    border: 2px solid rgba(255, 182, 193, 0.5);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    font-weight: 600;
    width: 100%;
}

.close-letter-btn:hover {
    background: rgba(255, 107, 157, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--glow);
}

/* Birthday Modal */
.birthday-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.birthday-modal.hidden {
    display: none;
}

.birthday-text {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    color: var(--soft-pink);
    text-align: center;
    text-shadow: 0 0 30px var(--glow), 0 0 50px rgba(255, 182, 193, 0.5);
    z-index: 3001;
    animation: birthdayPulse 1s ease infinite;
}

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

/* Confetti Container */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 3000;
}

.confetti-left,
.confetti-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
}

.confetti-left {
    left: 0;
}

.confetti-right {
    right: 0;
}

.confetti-piece {
    position: absolute;
    animation: confettiFall linear forwards;
    pointer-events: none;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(calc(var(--random-x, 0) * 200px)) rotate(720deg);
        opacity: 0;
    }
}

/* Confetti from left side */
.confetti-left .confetti-piece {
    animation-name: confettiFallLeft;
}

@keyframes confettiFallLeft {
    0% {
        transform: translateY(-100px) translateX(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(calc(50px + var(--random-x, 0) * 300px)) rotate(720deg);
        opacity: 0;
    }
}

/* Confetti from right side */
.confetti-right .confetti-piece {
    animation-name: confettiFallRight;
}

@keyframes confettiFallRight {
    0% {
        transform: translateY(-100px) translateX(50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(calc(-50px - var(--random-x, 0) * 300px)) rotate(720deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .birthday-text {
        font-size: 2.5rem;
    }
}

/* Responsive Letter */
@media (max-width: 768px) {
    .envelope-container {
        max-width: 90%;
        height: auto;
        min-height: 300px;
    }
    
    .envelope {
        width: 250px;
        height: 150px;
    }
    
    .letter {
        width: 230px;
        height: auto;
        min-height: 150px;
        padding: 1.5rem;
        max-height: 60vh;
    }
    
    .letter-text {
        font-size: 0.9rem;
    }
    
    .letter-signature {
        font-size: 1rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .romantic-text {
        font-size: 1.4rem;
    }
    
    .heart-button {
        font-size: 3rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 90%;
    }
    
    .rules-content {
        margin: 1.5rem 0;
        max-width: 100%;
    }
    
    .rule-step {
        padding: 0.8rem;
        margin-bottom: 1rem;
        gap: 0.8rem;
    }
    
    .rule-number {
        font-size: 1.2rem;
    }
    
    .rule-text {
        font-size: 0.95rem;
    }
    
    .top-bar {
        padding: 0.5rem;
        flex-wrap: nowrap;
        gap: 0.3rem;
        justify-content: space-between;
    }
    
    .controls-group {
        flex-wrap: nowrap;
        gap: 0.3rem;
    }
    
    .music-controls {
        flex-wrap: nowrap;
        gap: 0.3rem;
    }
    
    .control-btn {
        padding: 0.5rem;
        font-size: 1.2rem;
        min-height: 40px;
        min-width: 40px;
        border-radius: 50%;
    }
    
    .btn-text {
        display: none;
    }
    
    .photo-container {
        padding-top: 60px; /* Reduced space on mobile for more room */
    }
    
    .photo-card {
        border-radius: 8px;
    }
    
    .answer-btn {
        padding: 0.9rem 1.5rem;
        font-size: 1.1rem;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .romantic-text {
        font-size: 1.2rem;
    }
    
    .heart-button {
        font-size: 2.5rem;
    }
    
    .rules-content {
        margin: 1rem 0;
    }
    
    .rule-step {
        padding: 0.6rem;
        margin-bottom: 0.8rem;
        gap: 0.6rem;
    }
    
    .rule-number {
        font-size: 1rem;
    }
    
    .rule-text {
        font-size: 0.85rem;
    }
    
    .top-bar {
        padding: 0.4rem;
        gap: 0.2rem;
        flex-wrap: nowrap;
    }
    
    .controls-group {
        gap: 0.2rem;
        flex-wrap: nowrap;
    }
    
    .music-controls {
        gap: 0.2rem;
        flex-wrap: nowrap;
    }
    
    .control-btn {
        padding: 0.4rem;
        font-size: 1.1rem;
        min-height: 36px;
        min-width: 36px;
        border-radius: 50%;
    }
    
    .btn-text {
        display: none;
    }
    
    .photo-container {
        padding-top: 55px; /* Even more space on small mobile */
    }
    
    .lyrics-container {
        bottom: 10px;
        padding: 1rem 1.5rem;
        width: 95%;
    }
    
    .lyrics-text {
        font-size: 0.95rem;
    }
    
    .game-board {
        max-width: 90%;
        gap: 8px;
        padding: 8px;
    }
    
    .game-cell {
        min-height: 90px;
        font-size: 2.5rem;
        border-radius: 12px;
    }
    
    .game-status {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .submit-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

/* Tic-Tac-Toe Game */
.game-status {
    color: var(--soft-pink);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    text-shadow: 0 0 10px var(--glow);
    min-height: 2rem;
}

.winner-text {
    color: var(--rose);
    font-size: 1.5rem;
    animation: pulse 1s ease-in-out infinite;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 400px;
    width: 100%;
    margin: 0 auto 1.5rem;
    padding: 10px;
}

.game-cell {
    aspect-ratio: 1;
    min-height: 80px;
    background: rgba(255, 182, 193, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 182, 193, 0.3);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
}

.game-cell:active {
    transform: scale(0.95);
}

.game-cell.x {
    color: var(--rose);
    text-shadow: 0 0 15px var(--glow);
}

.game-cell.o {
    color: var(--soft-pink);
    text-shadow: 0 0 15px var(--glow);
}

.game-cell.winner {
    background: rgba(255, 107, 157, 0.3);
    border-color: var(--rose);
    box-shadow: 0 0 20px var(--glow);
    animation: winnerPulse 0.5s ease-in-out;
}

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

/* Mobile Fullscreen Styles */
@media (max-width: 768px) {
    .fullscreen-content {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .fullscreen-modal img {
        max-width: 95%;
        max-height: 60vh;
        min-width: auto;
    }
    
    .fullscreen-text {
        max-width: 95%;
        min-width: auto;
        padding: 1.5rem;
        max-height: 30vh;
    }
    
    .fullscreen-text p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

