/* Base & General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #1a1a1a;
    line-height: 1.6;
}

header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    color: #1a1a1a;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #1a1a1a;
    border-radius: 3px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}

nav a:hover {
    color: #1a1a1a;
}

/* Home Page Hero */
.hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.hero p {
    font-size: 1.125rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Apps Section */
.apps-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.apps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.apps-title h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

.apps-count {
    font-size: 0.875rem;
    color: #666;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid #ddd;
    background-color: #ffffff;
    color: #555;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tab:hover {
    border-color: #999;
}

.filter-tab.active {
    background-color: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.apps-grid {
    width: 97%;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

/* New App Card */
.app-card-new {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.875rem;
    position: relative;
    transition: all 0.3s ease;
}

.app-card-new:hover {
    background-color: #fafafa;
    border-color: #ccc;
}

.rank-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background-color: #ff6b6b;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.app-card-left {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    background-color: #f0f0f0;
}

.app-card-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.app-icon-text {
    font-weight: 800;
    color: #1a1a1a;
    font-size: 1.25rem;
}

.app-card-info {
    flex: 1;
    padding: 0 1rem;
    cursor: pointer;
}

.app-name-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
}

.app-info-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.info-icon {
    font-size: 0.85rem;
}

.bonus-text {
    font-size: 0.8rem;
    color: #ff6b6b;
    font-weight: 600;
}

.withdraw-text {
    font-size: 0.8rem;
    color: #666;
}

.app-card-right {
    display: flex;
    align-items: center;
}

.download-button {
    padding: 0.6rem 1.2rem;
    background-color: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.download-button:hover {
    background-color: #333;
    transform: scale(1.05);
}

/* Game Detail Page */
.game-detail {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.game-hero {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.game-hero-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.game-hero-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.game-hero-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.game-meta {
    display: flex;
    gap: 1.5rem;
    color: #666;
    margin-bottom: 1rem;
}

.game-bonus {
    color: #ff6b6b;
    font-weight: 600;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    color: #ffffff;
    background-color: #1a1a1a;
}

.btn:hover {
    background-color: #333;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.back-button:hover {
    color: #1a1a1a;
}

.game-description {
    margin-top: 2rem;
}

.game-description h2 {
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 3rem 2rem 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.footer-about p {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    text-decoration: none;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: #1a1a1a;
}

.footer-links li i {
    margin-right: 0.5rem;
    color: #1a1a1a;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    color: #666;
    font-size: 0.875rem;
}

/* Page styles */
.page-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem 3rem;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.page-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.page-content p, .page-content ul {
    color: #555;
    margin-bottom: 1rem;
}

.page-content ul {
    padding-left: 1.5rem;
}

/* Related Games */
.related-games {
    margin-top: 3rem;
}

.related-games h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Admin Panel */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.admin-card {
    padding: 1.5rem;
    border-radius: 12px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.admin-card h3 {
    font-size: 2rem;
}

.admin-card p {
    color: #666;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f5f5f5;
    font-weight: 600;
}

tbody tr:hover {
    background-color: #fafafa;
}

.action-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    margin-right: 0.5rem;
    background-color: #1a1a1a;
    color: #fff;
}

.action-btn.delete {
    background-color: #dc3545;
}

/* Form */
form {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #1a1a1a;
}

/* Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .game-hero {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        padding: 1rem;
        display: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .apps-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .app-card-new {
        flex-wrap: nowrap;
    }
    
    .app-card-left {
        width: 55px;
        height: 55px;
    }
    
    .app-card-info {
        padding: 0 0.75rem;
    }
    
    .app-name-text {
        font-size: 0.95rem;
    }
    
    .info-item {
        gap: 0.25rem;
    }
    
    .bonus-text, .withdraw-text {
        font-size: 0.75rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    header {
        padding: 0.75rem 1rem;
    }
    
    .filter-tabs {
        width: 100%;
    }
    
    .filter-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }
}
