/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a url('/static/pattern.png') repeat;
    background-size: 300px 300px;
    min-height: 100vh;
    height: 100vh;
    color: #333;
    overflow: hidden;
    overflow-x: hidden !important;
    max-width: 100vw;
    width: 100vw;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 12% 1fr 12%;
    position: relative;
}

/* Ad Banners */
.ad-banner {
    background: #2a2a2a;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
}

.ad-banner.left {
    grid-column: 1;
    grid-row: 1;
    border-right: 2px solid #444;
}

.ad-banner.right {
    grid-column: 3;
    grid-row: 1;
    border-left: 2px solid #444;
}

/* App Container */
#app {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3% 1%;
}

/* Landing Container */
.landing-container {
    max-width: 500px;
    margin: auto;
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Logo and Title */
.game-title-logo {
    height: 80px;
    width: auto;
    margin-bottom: 10px;
    object-fit: contain;
}

.game-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #f0f0f0;
    color: #666;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #e0e0e0;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Room Code Label */
.room-code-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #999;
    text-align: center;
    letter-spacing: 2px;
    margin-top: 5px;
    margin-bottom: -5px;
}

/* Room Code Container */
.room-code-container {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.room-code-box {
    width: 50px;
    height: 60px;
    padding: 0;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0;
}

.room-code-box:focus {
    outline: none;
    border-color: #667eea;
    transform: scale(1.05);
}

.input-section input:not(.room-code-box) {
    padding: 15px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

.input-section input:not(.room-code-box):focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.action-btn {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status Message */
.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
}

.status-message.error {
    background: #ffe0e0;
    color: #d32f2f;
}

.status-message.success {
    background: #e0ffe0;
    color: #2e7d32;
}

.status-message.info {
    background: #e3f2fd;
    color: #1976d2;
}

/* Footer */
.landing-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
}

.landing-footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.landing-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        grid-template-columns: 0 1fr 0;
    }
    
    .ad-banner {
        display: none;
    }
    
    .landing-container {
        padding: 30px;
        margin: 20px;
    }
    
    .game-title-logo {
        height: 60px;
    }
    
    .tab-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .input-section input,
    .action-btn {
        padding: 12px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .landing-container {
        padding: 20px;
    }
    
    .landing-footer {
        flex-direction: column;
        gap: 10px;
    }
}
