/* ============================================
   MAXIMUS's CLAY CREATURES - Game Styles
   A fun 3D collection game!
   ============================================ */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    background: #ffffff;
}

/* ============================================
   Welcome Screen
   ============================================ */
#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: auto;
    padding: 40px 20px;
}

.welcome-content {
    text-align: center;
    z-index: 10;
    padding: 40px;
    max-width: 900px;
    width: 100%;
}

.game-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.title-maximus {
    font-size: 2rem;
    font-weight: 900;
    color: #333;
    letter-spacing: 8px;
    text-transform: uppercase;
}

.title-creatures {
    font-size: 3.5rem;
    font-weight: 900;
    color: #000;
    letter-spacing: 4px;
}

.main-subtitle {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 50px;
    font-weight: 400;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.game-card {
    display: block;
    background: #fff;
    border: 3px solid #000;
    border-radius: 20px;
    padding: 40px 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 8px 8px 0 #000;
}

.game-card:active {
    transform: translateY(-4px);
    box-shadow: 4px 4px 0 #000;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.card-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.card-controls {
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ============================================
   Game UI
   ============================================ */
#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#game-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#collected-count {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#collected-count .icon {
    font-size: 1.5rem;
}

#count-number {
    color: #40e0d0;
    font-size: 1.5rem;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Collect Popup
   ============================================ */
#collect-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.popup-content {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 40, 0.95));
    backdrop-filter: blur(20px);
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(120, 0, 255, 0.3);
}

.popup-content p {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.popup-content button {
    padding: 12px 30px;
    margin: 0 10px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#collect-yes {
    background: linear-gradient(135deg, #00d9a6, #00b894);
    color: white;
    box-shadow: 0 5px 20px rgba(0, 217, 166, 0.4);
}

#collect-yes:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 217, 166, 0.6);
}

#collect-no {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#collect-no:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ============================================
   Click to Start Overlay
   ============================================ */
#click-to-start {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 150;
    cursor: pointer;
}

#click-to-start p {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

#home-button {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border: 3px solid #fff;
    border-radius: 10px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    pointer-events: auto;
}

#home-button:hover {
    background: #fff;
    color: #000;
    transform: translateY(-3px);
}

#home-button:active {
    transform: translateY(-1px);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* ============================================
   Word Bubbles
   ============================================ */
.word-bubble {
    background: white;
    color: black;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Comic Sans MS', 'Segoe UI', sans-serif;
    white-space: nowrap;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.word-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

/* ============================================
   Send Back Popup
   ============================================ */
#sendback-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.sendback-popup-content {
    text-align: center;
}

.sendback-popup-content p:first-child {
    font-size: 1.8rem;
    color: #ff6b6b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.sendback-popup-content .creature-name {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

#sendback-yes {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

#sendback-yes:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.6);
}

#sendback-no {
    background: linear-gradient(135deg, #00d9a6, #00b894);
    color: white;
    box-shadow: 0 5px 20px rgba(0, 217, 166, 0.4);
}

#sendback-no:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 217, 166, 0.6);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .title-maximus {
        font-size: 1.5rem;
    }

    .title-creatures {
        font-size: 2.2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .game-card {
        padding: 30px 20px;
    }

    .card-icon {
        font-size: 3rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .main-subtitle {
        font-size: 1.1rem;
    }
}