/***************************** BACKGROUND *****************************/
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat/Montserrat-Bold.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Futura';
    src: url('../fonts/futura-pt/futura-light.ttf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

html, body {
    margin: 0;
    height: 100vh;
    background: radial-gradient(circle at 30% 30%, #f3e9dc, #d5c2aa, #a68b73);
    font-family: 'Futura', 'Helvetica', 'Arial', sans-serif;
    overflow: hidden;
    position: relative;
    touch-action: manipulation; /* Improve mobile touch handling */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

/***************************** MARKET CONTENT *****************************/
.star-background {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #3f5048;
    border-radius: 50%;
    animation: twinkle 2s infinite;
    opacity: 0.8;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.3; }
}

.text-overlay {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: #3d5048af;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    max-width: 600px;
    font-size: 16px;
    z-index: 6;
}

.text-overlay strong { color: #FFFDD0; }

canvas {
    display: block;
    background-color: transparent;
    position: relative;
    z-index: 5;
}

.star-point {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    background: conic-gradient(from 45deg, #f7f2e1 25%, #f7f2e1 75%, #f7f2e1);
    clip-path: polygon(50% 0%, 70% 30%, 100% 30%, 70% 70%, 50% 100%, 30% 70%, 0% 30%, 30% 30%); /* Sharper 4-point star */
    animation: pulseStar 1.5s infinite ease-in-out;
    filter: drop-shadow(0 0 6px #f7f2e1);
    z-index: 10;
}

.star-point::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 247, 178, 0.9) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    z-index: -1;
}

@keyframes pulseStar {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

/***************************** MOBILE STYLES *****************************/
@media (max-width: 768px) {
    .text-overlay { 
        width: 85%;
        font-size: 1.2rem;
        margin-top: 30px;
    }
}