:root {
    --primary-color: #ff0040;
    --secondary-color: #1a1a1a;
    --text-color: #ffffff;
    --accent-color: #00ff00;
    --border-color: #333;
    --hover-color: #ff3366;
    --modal-bg: rgba(0, 0, 0, 0.9);
    --gradient-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    --tan-color: #e6a700; /* Updated: Changed tan color to a slightly orange shade */
}

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

body {
    font-family: 'Orbitron', monospace;
    background: var(--gradient-bg);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.squid-title {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ff69b4, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 0, 64, 0.5);
    letter-spacing: 0.2em;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-color);
    opacity: 0.8;
    letter-spacing: 0.1em;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.game-frame-wrapper {
    width: 100%;
    max-width: 800px;
    background: var(--secondary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 0, 64, 0.3);
    
    position: relative;
    height: 0;
    padding-top: 56.25%;
    box-sizing: border-box;
}

/* New: Class for square aspect ratio */
.game-frame-wrapper.square-frame {
    padding-top: 100%; /* 1:1 Aspect Ratio (height / width = 1 / 1 = 1) */
}

.game-title {
    text-align: center;
    padding: 0.75rem 1rem; /* Adjusted padding to bring title closer */
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    width: 100%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 0, 64, 0.3);
    border: 2px solid var(--primary-color);
}

/* New: Styles for split-colored title for Red Light Green Light */
.game-title .red-text {
    color: var(--primary-color); /* Red color for "Red Light" */
}

.game-title .green-text {
    color: var(--accent-color); /* Green color for "Green Light" */
}

/* New: Style for Honeycomb title */
.game-title.tan-text {
    color: var(--tan-color);
    background: var(--secondary-color); /* Reset gradient background to solid for tan text */
}

#gameFrame {
    width: 100%;
    height: 100%; /* New: Fill the aspect ratio container */
    display: block;
    position: absolute; /* New: Position within the relative parent */
    top: 0;
    left: 0;
    overflow-y: auto; /* Ensure vertical scrolling within the iframe */
}

.controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.primary-btn {
    background: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(255, 0, 64, 0.4);
}

.primary-btn:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 64, 0.6);
}

.secondary-btn {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--secondary-color);
    padding: 3rem;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

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

.modal-content p {
    margin-bottom: 2rem;
    line-height: 1.6;
    opacity: 0.9;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .squid-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }

    .game-title {
        font-size: 1.5rem;
        padding: 0.5rem 1rem; /* Adjusted padding for smaller screens */
    }
    
    #gameFrame {
        /* No fixed height needed here as it's handled by aspect ratio */
    }
    
    .btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}