/* Mafia Game Site - Premium Vintage Style */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@400;700&display=swap');

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

body {
    font-family: 'Lato', 'Segoe UI', sans-serif;
    background-color: #f0e6d2;
    background-image: 
        radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.1) 100%),
        repeating-linear-gradient(45deg, rgba(194, 168, 124, 0.1) 0px, rgba(194, 168, 124, 0.1) 1px, transparent 1px, transparent 10px);
    color: #1a0f08;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === HEADER (Redesigned) === */
header {
    background: linear-gradient(to bottom, #1a110d 0%, #2c1810 100%);
    height: 80px;
    border-bottom: 4px solid #c5a059;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
}

header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #c5a059;
    opacity: 0.6;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Logo */
.logo-wrapper {
    flex-shrink: 0;
    margin-right: 40px;
}

.site-logo {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(197, 160, 89, 0.3);
}

.site-logo a {
    color: #e6cfa0;
    text-decoration: none;
    background: -webkit-linear-gradient(#fff, #c5a059);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s;
}

.site-logo a:hover {
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.6);
}

/* Header Extras (Badge + Mobile Toggle) */
.header-extras {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Яркая плашка "Неофициальный сайт" */
.unofficial-notice {
    background: #c5a059; /* Золотой фон для контраста */
    color: #1a0f08;      /* Темный текст */
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 800;    /* Очень жирный */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #fff; /* Белая обводка для выделения */
    white-space: nowrap;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
    cursor: help;
    transition: transform 0.2s;
}

.unofficial-notice:hover {
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #c5a059;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* === NAVIGATION (Desktop Dropdown) === */
#main-nav {
    flex-grow: 1;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: block;
    color: #bfb092;
    text-decoration: none;
    padding: 28px 15px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-item > a i {
    font-size: 0.7em;
    margin-left: 5px;
    opacity: 0.7;
    transition: transform 0.3s;
}

.nav-item:hover > a, .nav-item > a.active {
    color: #fff;
    background: linear-gradient(to bottom, transparent 80%, rgba(197, 160, 89, 0.1) 100%);
    border-bottom-color: #c5a059;
}

.nav-item:hover > a i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 240px;
    background: #1f120a;
    border: 1px solid #c5a059;
    border-top: 4px solid #c5a059;
    box-shadow: 0 15px 30px rgba(0,0,0,0.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 10px 0;
    z-index: 999;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #bfb092;
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    white-space: normal;
    line-height: 1.4;
}

.dropdown-menu a:hover {
    background: rgba(197, 160, 89, 0.1);
    color: #fff;
    border-left-color: #c5a059;
    padding-left: 25px;
}


/* === PAGE CONTENT STYLES === */
.game-header {
    background: 
        linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
        url('https://www.transparenttextures.com/patterns/cubes.png'),
        linear-gradient(135deg, #2c1810 0%, #3d2418 100%);
    border-radius: 4px;
    padding: 45px 30px;
    margin: 35px 0;
    border: 1px solid #c5a059;
    outline: 3px solid rgba(197, 160, 89, 0.1);
    outline-offset: 5px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-header h1 {
    color: #e6cfa0;
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.2;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.8);
}

.badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.badge {
    background: rgba(0,0,0,0.5);
    color: #c5a059;
    padding: 8px 16px;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #c5a059;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    font-family: 'Lato', sans-serif;
}

.introduction {
    background: #fffcf5;
    border-left: 6px solid #c5a059;
    padding: 30px;
    margin: 30px 0;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    font-size: 1.15rem;
    color: #3d2e22;
}

.introduction::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: rgba(197, 160, 89, 0.2);
    line-height: 1;
}

.introduction a {
    color: #964b00;
    text-decoration: none;
    border-bottom: 2px solid #c5a059;
    font-weight: 700;
    transition: all 0.3s;
    padding-bottom: 1px;
}

.introduction a:hover {
    color: #fff;
    background-color: #964b00;
    border-bottom-color: transparent;
    padding: 2px 6px;
    border-radius: 3px;
}

.game-content {
    background: #fff;
    border-radius: 2px;
    padding: 50px;
    margin-bottom: 50px;
    line-height: 1.8;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0d5c5;
    position: relative;
}

.game-content::before, .game-content::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #c5a059;
    transition: all 0.3s;
}
.game-content::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.game-content::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.game-content h2 {
    color: #1a0f08;
    margin: 40px 0 25px;
    font-size: 2.2rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    border-bottom: 3px double #c5a059;
    padding-bottom: 15px;
    display: inline-block;
    width: 100%;
}

.game-content h3 {
    color: #5c3a21;
    margin: 30px 0 15px;
    font-size: 1.6rem;
    font-family: 'Playfair Display', serif;
    border-left: 4px solid #c5a059;
    padding-left: 15px;
}

.game-content p {
    margin-bottom: 20px;
    color: #4a3b32;
    font-size: 1.08rem;
}

.game-content ul, .game-content ol {
    margin: 25px 0;
    padding-left: 20px;
    list-style: none;
}

.game-content li {
    margin: 12px 0;
    position: relative;
    padding-left: 25px;
}

.game-content li::before {
    content: '♦';
    color: #c5a059;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
}

.game-content a {
    color: #c5a059;
    text-decoration: none;
    border-bottom: 1px dotted #c5a059;
    font-weight: 600;
    transition: all 0.3s;
}

.game-content a:hover {
    color: #964b00;
    border-bottom-style: solid;
}

.game-content blockquote {
    background: #f5f0e6;
    border: 1px solid #e0d5c5;
    padding: 30px;
    margin: 30px 0;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: #5c3a21;
    text-align: center;
    position: relative;
}

/* Download Buttons */
.download-btn, .game-content .download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(to bottom, #c5a059 0%, #964b00 100%);
    color: #fff !important;
    padding: 18px 40px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #7a3e00;
    box-shadow: 0 5px 15px rgba(150, 75, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.download-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(150, 75, 0, 0.6);
    background: linear-gradient(to bottom, #d4af6a 0%, #a85400 100%);
}

.download-btn:hover::after {
    left: 100%;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 0 30px;
    margin-top: auto;
    border-top: 5px solid #c5a059;
    background: #1a0f08;
    background-image: url('https://www.transparenttextures.com/patterns/dark-leather.png');
    color: #b0a090;
    position: relative;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    text-align: left;
}

.footer-col {
    flex: 1;
    min-width: 220px;
    max-width: 280px;
}

.footer-col h4 {
    color: #e6cfa0;
    border-bottom: 1px solid #5c3a21;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #8f7a66;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: block;
}

.footer-col a:hover {
    color: #c5a059;
    transform: translateX(5px);
}

.footer-disclaimer {
    background: rgba(197, 160, 89, 0.05);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 30px;
    color: #8f7a66;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.9rem;
}

/* SEO Keywords (hidden) */
.seo-keywords {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* === GAMES GRID (Card Layout) === */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.game-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid #e0d5c5;
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.3);
    border-color: #c5a059;
}

.game-card.featured {
    border-color: #c5a059;
    box-shadow: 0 5px 25px rgba(197, 160, 89, 0.2);
}

.game-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #1a0f08;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.game-card-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-items: flex-end;
}

.game-year {
    background: rgba(0,0,0,0.8);
    color: #c5a059;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid #c5a059;
}

.game-badge {
    background: linear-gradient(135deg, #c5a059 0%, #964b00 100%);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-badge.classic {
    background: linear-gradient(135deg, #5c3a21 0%, #3d2418 100%);
}

.game-card-content {
    padding: 25px;
}

.game-card-content h3 {
    color: #1a0f08;
    font-size: 1.5rem;
    margin: 0 0 15px 0;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.3;
}

.game-card-content p {
    color: #5c3a21;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.game-card-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-details, .btn-download {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-details {
    background: #f5f0e6;
    color: #5c3a21;
    border: 2px solid #c5a059;
}

.btn-details:hover {
    background: #c5a059;
    color: #fff;
}

.btn-download {
    background: linear-gradient(to bottom, #c5a059 0%, #964b00 100%);
    color: #fff !important;
    border: 2px solid #7a3e00;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-download:hover {
    background: linear-gradient(to bottom, #d4af6a 0%, #a85400 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(150, 75, 0, 0.4);
}

.btn-download i {
    font-size: 0.9em;
}

/* === SCREENSHOTS GALLERY === */
.screenshots-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0 40px 0;
}

.screenshot-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid #e0d5c5;
}

.screenshot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.3);
    border-color: #c5a059;
}

.screenshot-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.screenshot-item:hover img {
    transform: scale(1.05);
}

.screenshot-caption {
    padding: 15px;
    background: #f5f0e6;
    color: #5c3a21;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    border-top: 2px solid #c5a059;
}

/* Responsive */
@media (max-width: 900px) {
    header {
        height: auto;
        padding: 15px 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }

    #main-nav {
        display: none;
        width: 100%;
        background: #1f120a;
        border-top: 2px solid #c5a059;
        margin-top: 15px;
        border-radius: 4px;
    }

    #main-nav.active {
        display: block;
    }
    
    .header-container {
        flex-wrap: wrap;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-item > a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    /* Mobile Dropdowns */
    .dropdown-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(0,0,0,0.2);
        display: none;
        padding-left: 20px;
    }
    
    .nav-item.open .dropdown-menu {
        display: block;
    }

    .header-extras {
        margin-left: auto;
    }
    
    .logo-wrapper {
        margin-right: 0;
    }
    
    .unofficial-notice {
        font-size: 0.65rem;
        padding: 5px 10px;
    }
}

@media (max-width: 600px) {
    .game-header h1 {
        font-size: 2rem;
    }
    
    .site-logo {
        font-size: 1.8rem;
    }
    
    .game-content {
        padding: 25px 15px;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .game-card-footer {
        flex-direction: column;
    }
    
    .btn-details, .btn-download {
        width: 100%;
    }
}