/* AIARM - Main Styles with VS Code Dark Theme */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* VS Code Dark Theme Colors */
    --primary-color: #007acc;
    --secondary-color: #4ec9b0;
    --danger-color: #f48771;
    --success-color: #89d185;
    --warning-color: #ce9178;
    
    /* Backgrounds */
    --dark-bg: #1e1e1e;
    --darker-bg: #252526;
    --sidebar-bg: #333333;
    --input-bg: #3c3c3c;
    --hover-bg: #2a2d2e;
    --border-color: #454545;
    
    /* Text */
    --text-dark: #1e1e1e;
    --text-light: #d4d4d4;
    --text-muted: #858585;
    --text-bright: #ffffff;
}

body {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--dark-bg);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d30 100%);
    color: var(--text-bright);
    padding: 6rem 0;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
}

.hero-title {
    font-size: 56px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), #66b9f4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-family: 'Consolas', 'Monaco', monospace;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-bright);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background-color: #005a9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.4);
}

.btn-secondary {
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-secondary:hover {
    background-color: var(--hover-bg);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
}

/* Links */
.link-primary {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.link-primary:hover {
    color: #66b9f4;
    text-decoration: underline;
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin: 48px 0 32px;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.feature {
    background-color: var(--darker-bg);
    padding: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    text-align: center;
    transition: all 0.3s;
}

.feature:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 122, 204, 0.2);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.feature p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 14px;
}

/* Auth Forms */
.auth-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.auth-container {
    background-color: var(--darker-bg);
    padding: 48px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    width: 100%;
    max-width: 440px;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-bright);
    font-size: 24px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-light);
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    transition: all 0.3s;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--darker-bg);
    box-shadow: 0 0 0 3px rgba(0,122,204,0.2);
}

.form-hint {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
}

.auth-links {
    margin-top: 24px;
    text-align: center;
}

.auth-links p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 12px;
}

/* Messages */
.error-message {
    background-color: rgba(244, 135, 113, 0.15);
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 3px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--danger-color);
    font-family: 'Consolas', monospace;
}

.success-message {
    background-color: rgba(137, 209, 133, 0.15);
    color: var(--success-color);
    padding: 1rem;
    border-radius: 3px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--success-color);
    font-family: 'Consolas', monospace;
}

/* Lobby Styles */
.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
}

.lobby-header h1 {
    font-size: 32px;
    color: var(--text-light);
}

.user-info {
    background-color: var(--darker-bg);
    padding: 12px 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.lobby-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.games-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.games-list-header h2 {
    font-size: 24px;
    color: var(--text-light);
}

.games-count {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.game-card {
    background-color: var(--darker-bg);
    padding: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.game-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--darker-bg);
    border-radius: 4px;
    overflow: hidden;
}

table thead {
    background-color: var(--sidebar-bg);
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    font-weight: 600;
    color: var(--primary-color);
}

table tr:hover {
    background-color: var(--hover-bg);
}

/* Cards */
.card {
    background-color: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Footer */
footer {
    background-color: var(--sidebar-bg);
    color: var(--text-muted);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-logo h2 {
    color: var(--text-bright);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.footer-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.footer-menu a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    font-size: 14px;
}

.footer-menu a:hover {
    color: var(--primary-color);
    background-color: var(--hover-bg);
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    padding-top: 1rem;
}

.footer-copyright p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-container {
        padding: 24px;
    }
    
    .lobby-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-menu {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
