/* Tanks Index Page Styles (Based on Portal Style) */

:root {
    /* Tanks Themed Gradient (Orange/Red/Dark) */
    --primary-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --secondary-gradient: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    --dark-bg: #1a1a1a;
    --card-bg: rgba(30, 30, 30, 0.6);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #ffd700;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    /* Subtle grid pattern for Tanks feel */
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--text-primary);
    min-height: 100vh;
}

.game-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.game-header {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center the title */
    margin-bottom: 40px;
    position: relative;
    padding-top: 20px;
    /* Ensure min-height if needed */
}

.back-button {
    position: absolute;
    left: 0;
    /* Remove top/transform to avoid vertical alignment issues */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    font-family: 'Segoe UI', sans-serif;
    z-index: 10;
    /* Ensure button is clickcable above title if they somehow overlap */
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px);
}

.game-header h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    color: var(--accent-color);
    text-shadow: 4px 4px #880000;
    line-height: 1.5;
    margin: 0;
    /* Add padding to prevent overlap on smaller screens (button width + gap) */
    padding: 0 140px;
}

/* Rules Section */
.game-rules {
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    padding: 30px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.game-rules h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
}

.rule-item i {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-top: 4px;
}

.rule-item p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Main Content */
.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: center; -- Remove this so content flows naturally */
}

/* Keep existing styles */
.mode-selection h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-weight: 400;
}

.mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-card:hover {
    border-color: rgba(255, 215, 0, 0.5);
    /* Gold border on hover */
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #fca048;
    /* Fallback */
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
}

.card-description {
    font-size: 1.0rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
    flex-grow: 1;
}

/* Buttons */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.action-btn {
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    text-decoration: none;
    color: white;
    width: 100%;
    font-family: 'Segoe UI', sans-serif;
    /* Modern font for buttons */
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Specific Button Colors */
.btn-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn-yellow {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    color: #000;
}

.btn-orange {
    background: linear-gradient(135deg, #ff512f 0%, #f09819 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
    }

    .game-header h1 {
        font-size: 1.5rem;
        padding: 0;
        /* Reset padding on mobile where layout changes */
        margin-top: 10px;
    }

    .back-button {
        position: static;
        transform: none;
        margin-bottom: 15px;
        display: inline-flex;
        align-self: flex-start;
        /* Align left */
    }

    .game-header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}