@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #FF8200;
    --primary-dark: #cc6800;
    --background: #f0f4f8;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: url('assets/bg.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #333;
}

.game-container {
    width: 100%;
    max-width: 450px;
    height: 90vh;
    max-height: 800px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: relative;
    z-index: 10;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-weight: 800;
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary), #FFB000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.header p {
    font-weight: 400;
    color: #666;
    font-size: 1rem;
}

.game-area {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.scratch-box {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    background: #fff;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FF8200' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E") 12 12, auto;
}

#prize-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

#scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    touch-action: none;
}

.footer {
    padding-top: 2rem;
    text-align: center;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(255, 130, 0, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 130, 0, 0.4);
    background: var(--primary-dark);
}

.btn:active {
    transform: translateY(-1px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    transition: var(--transition);
}

.social-links a:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

.social-links img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.social-text {
    margin-top: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}

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

/* Modal Overlay */
#win-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.win-badge {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

#win-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

#win-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.modal-content p {
    margin-bottom: 2rem;
    color: #666;
}

/* Responsive Hacks */
@media (max-width: 500px) {
    .game-container {
        height: 100vh;
        border-radius: 0;
    }
}
