@charset "utf-8";

/* CSS Variables for easy theming */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    font-size: 16px;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
}

.header a {
    display: inline-block;
}

.header .logo {
    max-width: 600px;
    width: 100%;
    height: auto;
    transition: var(--transition);
}

.header .logo:hover {
    transform: scale(1.02);
}

/* Navigation */
.nav-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: none;
    cursor: pointer;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(52, 152, 219, 0.4);
    text-decoration: none;
    color: #fff;
}

.nav-btn svg {
    width: 18px;
    height: 18px;
}

/* Section Titles */
.section-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 50px 0 30px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Game Card */
.game-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.game-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.game-card img {
    width: 100%;
    aspect-ratio: 600 / 313;
    object-fit: cover;
    transition: var(--transition);
}

.game-card:hover img {
    transform: scale(1.05);
}

.game-card .card-body {
    padding: 20px;
    overflow: hidden;
}

.game-card h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.game-card p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.game-card .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.game-card .badge.new {
    background: linear-gradient(135deg, #00b894, #00cec9);
}

/* Featured Game */
.featured-game {
    grid-column: 1 / -1;
    max-width: 600px;
    margin: 0 auto;
}

.featured-game .game-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.featured-game .game-card h3,
.featured-game .game-card p {
    color: #fff;
}

.featured-game .game-card img {
    aspect-ratio: 600 / 313;
}

/* Partners Section */
.partners-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-top: 50px;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.partners-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    transition: var(--transition);
}

.partners-grid a:hover {
    transform: scale(1.1);
    background: #fff;
}

.partners-grid img {
    max-height: 40px;
    width: auto;
    filter: grayscale(30%);
    transition: var(--transition);
}

.partners-grid a:hover img {
    filter: grayscale(0%);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
    margin: 0 10px;
    font-size: 14px;
}

.footer a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer-links {
    margin-top: 15px;
}

/* Content Box (for newsletter, contact, about pages) */
.content-box {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.content-box h2 {
    color: var(--primary-color);
    margin: 0 0 20px;
    text-align: center;
}

.content-box p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #e1e5eb;
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-top: 20px;
    font-size: 14px;
    transition: var(--transition);
}

.back-link:hover {
    color: #fff;
    text-decoration: none;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* About section specific */
.about-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    margin-top: 20px;
}

.about-info dt {
    font-weight: 600;
    color: var(--primary-color);
}

.about-info dd {
    margin: 0;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px 15px;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-section {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .content-box {
        padding: 25px;
    }
    
    .partners-grid {
        gap: 15px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.game-card {
    animation: fadeIn 0.6s ease forwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }

/* Tooltip (keeping compatibility) */
.tooltip {
    display: none;
    background: transparent url(/images/tooltip/black_arrow.png);
    font-size: 12px;
    height: 70px;
    width: 160px;
    padding: 25px;
    color: #fff;
}

.tooltip.bottom {
    background: url(/images/tooltip/black_arrow_bottom.png);
    padding-top: 40px;
    height: 55px;
}

/* Form validation */
label.error {
    color: var(--accent-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

/* Pirates Glory page */
.pg-list {
    padding-left: 20px;
    margin: 15px 0;
    color: var(--text-light);
}

.pg-list li {
    margin-bottom: 8px;
}

.pg-credits {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.pg-credits li {
    margin-bottom: 6px;
}

.pg-credits a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
}

.pg-credits a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Content box links */
.content-box a:not(.btn):not(.back-link) {
    color: var(--secondary-color);
}

.content-box a:not(.btn):not(.back-link):hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Archived Games */
.archived-game {
    display: flex;
    gap: 25px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.archived-game-image {
    flex-shrink: 0;
}

.archived-game-image img {
    width: 150px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.archived-game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.archived-game-content h3 {
    margin: 0 0 5px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.archived-years {
    font-size: 0.9rem;
    color: #888;
    margin: 0 0 12px;
    font-style: italic;
}

.archived-game-content p {
    margin: 0 0 10px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.archived-link {
    margin-top: auto;
    text-align: right;
}

.archived-link a {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-discontinued {
    background: #e74c3c;
    color: #fff;
}

.tag-retired {
    background: #95a5a6;
    color: #fff;
}

@media (max-width: 500px) {
    .archived-game {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .archived-game-content h3 {
        justify-content: center;
    }
    
    .archived-link {
        text-align: center;
    }
}
