/* ===================================
   Sarah's Scratch and Sniff
   Sexy Adult Theme Styles
   =================================== */

/* CSS Variables */
:root {
    --color-burgundy: #722F37;
    --color-burgundy-dark: #4a1f24;
    --color-burgundy-light: #8B3A44;
    --color-rose-gold: #B76E79;
    --color-rose-gold-light: #E8B4B8;
    --color-gold: #D4AF37;
    --color-black: #1a1a1a;
    --color-cream: #FDF5E6;
    --color-pink-soft: #FFE4E9;
    
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Cormorant Garamond', Georgia, serif;
    
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(183, 110, 121, 0.4);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(183, 110, 121, 0.2);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-burgundy-dark);
    background-image: url('../images/backgrounds/silk-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--color-cream);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Page overlay for depth */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.7) 0%,
        rgba(114, 47, 55, 0.5) 50%,
        rgba(26, 26, 26, 0.8) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* Page Wrapper */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}

/* ===================================
   Header
   =================================== */
.header {
    text-align: center;
    padding: 0.25rem 0 0.25rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    max-width: 260px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    margin-bottom: 0.15rem;
}

.tagline {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-rose-gold-light);
    font-style: italic;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
}

.tagline em {
    color: var(--color-gold);
    font-weight: 600;
}

/* ===================================
   Game Container
   =================================== */
.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

/* ===================================
   Scratch Card
   =================================== */
.scratch-card {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    animation: cardFloat 3s ease-in-out infinite, fadeInUp 0.8s ease-out;
    border: 3px solid var(--color-rose-gold);
}

.scratch-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        var(--color-gold),
        var(--color-rose-gold),
        var(--color-burgundy-light),
        var(--color-rose-gold),
        var(--color-gold)
    );
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
    background-size: 300% 300%;
}

/* Prize Layer */
.prize-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        var(--color-burgundy-dark) 0%,
        var(--color-black) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.prize-image {
    width: 60%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.prize-info {
    text-align: center;
}

.product-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-cream);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.price-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.original-price {
    font-size: 1.1rem;
    color: var(--color-rose-gold-light);
    text-decoration: line-through;
    opacity: 0.8;
}

.discount-badge {
    background: linear-gradient(135deg, var(--color-gold), var(--color-rose-gold));
    color: var(--color-black);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
    text-shadow: none;
}

.final-price {
    font-size: 1.1rem;
    color: var(--color-cream);
}

.final-price strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Scratch Canvas */
.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: none;
}

/* Scratch Instruction Overlay */
.scratch-instruction {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
}

.scratch-instruction.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.scratch-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    animation: bounce 1s ease-in-out infinite;
}

.scratch-instruction p {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-cream);
    text-shadow: 
        0 0 10px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 0, 0, 0.6);
    background: rgba(26, 26, 26, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

/* ===================================
   Reveal Actions
   =================================== */
.reveal-actions {
    width: 100%;
    max-width: 320px;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.congrats-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    animation: shimmer 2s ease-in-out infinite;
}

/* PayPal Button Container */
#paypal-button-container {
    margin-bottom: 1rem;
    min-height: 45px;
}

/* Play Again Button */
.play-again-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-cream);
    background: linear-gradient(
        135deg,
        var(--color-burgundy) 0%,
        var(--color-burgundy-light) 50%,
        var(--color-burgundy) 100%
    );
    background-size: 200% 200%;
    border: 2px solid var(--color-rose-gold);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.play-again-btn:hover,
.play-again-btn:focus {
    background-position: 100% 0;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
    border-color: var(--color-gold);
}

.play-again-btn:active {
    transform: translateY(0);
}

.btn-sparkle {
    display: inline-block;
    animation: sparkle 1.5s ease-in-out infinite;
}

.btn-sparkle:last-child {
    animation-delay: 0.75s;
}

/* ===================================
   Footer
   =================================== */
.footer {
    text-align: center;
    padding: 1.5rem 0 1rem;
    font-size: 0.85rem;
    color: var(--color-rose-gold-light);
    opacity: 0.8;
}

.footer p {
    margin-bottom: 0.25rem;
}

.disclaimer {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes shimmer {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }
    50% {
        text-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.5),
            0 0 20px rgba(212, 175, 55, 0.5);
    }
}

/* ===================================
   Responsive - Tablet & Desktop
   =================================== */
@media (min-width: 768px) {
    .page-wrapper {
        padding: 2rem;
    }
    
    .header {
        padding: 1rem 0 1.5rem;
    }
    
    .logo {
        max-width: 400px;
    }
    
    .tagline {
        font-size: 1.3rem;
    }
    
    .game-container {
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .scratch-card {
        max-width: 400px;
    }
    
    .product-name {
        font-size: 1.5rem;
    }
    
    .final-price strong {
        font-size: 1.8rem;
    }
    
    .reveal-actions {
        max-width: 400px;
    }
    
    .congrats-text {
        font-size: 1.4rem;
    }
    
    .play-again-btn {
        font-size: 1.2rem;
        padding: 1.2rem 2.5rem;
    }
}

@media (min-width: 1024px) {
    .header {
        padding: 2rem 0;
    }
    
    .logo {
        max-width: 500px;
    }
    
    .scratch-card {
        max-width: 450px;
    }
    
    .game-container {
        gap: 2rem;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Revealed state - card stops floating */
.scratch-card.revealed {
    animation: none;
}

