:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --surface: #141414;
    --surface-hover: #1f1f1f;
    --border: #2a2a2a;
    --border-light: #333333;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --accent: #FFD700;
    --accent-hover: #FFC107;
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === HEADER === */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo .accent {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === MAIN CONTENT LAYOUT === */
.game-page {
    padding: 140px 0 60px;
}

.content-wrapper {
    display: flex;
    gap: 32px;
    margin-top: 32px;
}

.main-content {
    flex: 0 0 68%;
}

.sidebar {
    flex: 0 0 30%;
}

/* === BREADCRUMBS === */
.breadcrumbs {
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

/* === GAME HEADER === */
.game-header {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 24px;
}

.game-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.game-meta {
    display: flex;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === CONTENT SECTIONS === */
.content-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--accent);
}

/* === CODE TABLE === */
.codes-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.codes-table th {
    text-align: left;
    padding: 16px;
    background: var(--bg-tertiary);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.codes-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.codes-table tr:last-child td {
    border-bottom: none;
}

.code-text {
    font-family: monospace;
    font-size: 16px;
    color: var(--accent);
    font-weight: 500;
}

.copy-btn {
    background: var(--gradient-gold);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.3);
}

.copy-btn.copied {
    background: #4CAF50;
}

/* === REDEMPTION STEPS === */
.steps-list {
    list-style: none;
    counter-reset: step-counter;
}

.step-item {
    margin-bottom: 24px;
    padding-left: 60px;
    position: relative;
}

.step-item:before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--gradient-gold);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.step-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}

/* === EXPIRED CODES === */
.expired-codes {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
}

.expired-code {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expired-code:last-child {
    border-bottom: none;
}

.code-status {
    background: #f44336;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* === AD SLOTS === */
.ad-banner {
    margin: 32px 0;
    padding: 10px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    box-sizing: border-box;
    overflow-x: auto;
    justify-content: flex-start;
}

.ad-card {
    margin: 32px 0;
    padding: 20px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 250px;
}

.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.ad-card.small {
    min-height: 250px;
}

.ad-banner iframe,
.ad-card iframe {
    max-width: none;
}

/* === POPULAR GAMES WIDGET === */
.widget {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.widget-title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.popular-games-list {
    list-style: none;
}

.popular-game {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.popular-game:last-child {
    border-bottom: none;
}

.popular-game-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.popular-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-game-name {
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-game-name:hover {
    color: var(--accent);
}

/* === FOOTER === */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-brand .accent {
    color: var(--accent);
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section h4 {
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* === CUSTOM AD BANNER === */
.custom-ad-banner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 0 0 32px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.custom-ad-banner a {
    display: block;
    line-height: 0;
}

.custom-ad-banner img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .main-content, .sidebar {
        flex: 1;
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        text-align: center;
    }

    .game-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .step-item {
        padding-left: 50px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ad-card {
        min-height: 120px;
    }
    .ad-card.small {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .game-page {
        padding: 120px 0 40px;
    }

    .content-section {
        padding: 24px;
    }

    .codes-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .game-info h1 {
        font-size: 24px;
    }

    .section-title {
        font-size: 20px;
    }

    .ad-card {
        min-height: 100px;
        padding: 10px;
    }
    .ad-card.small {
        min-height: 250px;
    }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* === UTILITY CLASSES === */
.text-muted {
    color: var(--text-muted);
}

.text-accent {
    color: var(--accent);
}

.mb-24 {
    margin-bottom: 24px;
}

/* === DESKTOP ADJUSTMENTS (min-width: 1025px) === */
@media (min-width: 1025px) {
  .ad-container {
    min-width: 0;
    max-width: 728px;
    margin: 0 auto;
    width: 100%;
  }
  .ad-card.small {
    min-height: 250px;
  }
  
  /* تعديل خاص للإعلانات الجانبية */
  .sidebar .ad-container {
    max-width: 300px;
  }
}