/* Reset and prevent scrolling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

html, body {
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Disable scrolling */
    position: relative;
}

/* Full-screen background image */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('./assets/back.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: filter 0.3s ease;
}

/* Black and white filter state */
.background.bw {
    filter: grayscale(100%);
}

/* Prevent right-click context menu on background */
.background {
    -webkit-touch-callout: none;
}

/* Motivational text display */
.motivational-text {
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    max-width: 80%;
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8),
                 0 2px 10px rgba(0, 0, 0, 0.6);
    font-family: 'Georgia', serif;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
}

.motivational-text.show {
    opacity: 1;
}

/* Centered generate button */
.generate-btn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    padding: 20px 40px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
}

.generate-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.generate-btn:active {
    transform: translate(-50%, -50%) scale(0.98);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading indicator */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 30px 50px;
    border-radius: 15px;
    color: white;
    font-family: 'Arial', sans-serif;
}

.loading.hidden {
    display: none;
}

/* Spinner animation */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    margin: 0;
    font-size: 16px;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    /* Move button lower on mobile */
    .generate-btn {
        top: 70%;
        padding: 16px 32px;
        font-size: 20px;
    }
    
    /* Position motivational text higher and smaller on mobile */
    .motivational-text {
        top: 25%;
        max-width: 90%;
        font-size: 20px;
        line-height: 1.3;
    }
    
    /* Adjust loading indicator */
    .loading {
        padding: 20px 30px;
    }
    
    .loading p {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    /* Further adjustments for very small screens */
    .generate-btn {
        top: 75%;
        padding: 14px 28px;
        font-size: 18px;
    }
    
    .motivational-text {
        top: 20%;
        max-width: 95%;
        font-size: 18px;
    }
}
