/* assets/css/style.css */

/* ========== Variables ========== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #00d4ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1a1a2e;
    --darker: #16213e;
    --darkest: #0f3460;
    --light: #e2e8f0;
    --white: #ffffff;
    --gray: #64748b;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #667eea 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
    --radius: 12px;
    --radius-lg: 20px;
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== Container ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Navigation ========== */
.navbar {
    background: rgba(22, 33, 62, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    font-size: 28px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-box {
    flex: 1;
    max-width: 500px;
}

.search-box form {
    display: flex;
    background: var(--darkest);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 14px;
}

.search-box input::placeholder {
    color: var(--gray);
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    padding: 12px 20px;
    background: var(--gradient);
    border: none;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    opacity: 0.9;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: var(--light);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.wallet-link {
    background: var(--gradient);
    color: var(--white) !important;
}

.wallet-link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.wallet-link .balance {
    font-weight: 600;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--darker);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--light);
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.dropdown-content a i {
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
}

.dropdown-header, .dropdown-footer {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--accent);
    text-align: center;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.notification-btn {
    position: relative;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--darkest);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* ========== Cards ========== */
.card {
    background: var(--darker);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(102, 126, 234, 0.3);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Game Card */
.game-card {
    position: relative;
    background: var(--darker);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
    border-color: var(--primary);
}

.game-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-card-image img {
    transform: scale(1.1);
}

.game-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    background: var(--gradient);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.game-card-discount {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    background: var(--danger);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    border-radius: 5px;
}

.game-card-wishlist {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.game-card:hover .game-card-wishlist {
    opacity: 1;
}

.game-card-wishlist:hover {
    background: var(--danger);
    transform: scale(1.1);
}

.game-card-wishlist.active {
    background: var(--danger);
    opacity: 1;
}

.game-card-content {
    padding: 20px;
}

.game-card-platform {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.platform-tag {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 11px;
    color: var(--accent);
}

.game-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-seller {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--gray);
}

.game-card-seller img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.game-card-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-current {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.price-original {
    font-size: 14px;
    color: var(--gray);
    text-decoration: line-through;
    margin-left: 10px;
}

.game-card-action .btn {
    padding: 10px 20px;
}

/* ========== Forms ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--light);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--darkest);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--white);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.form-control::placeholder {
    color: var(--gray);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.form-text {
    font-size: 12px;
    color: var(--gray);
    margin-top: 5px;
}

.form-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 5px;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 10px 0 0 10px;
}

.input-group-text {
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    border-radius: 0 10px 10px 0;
    color: var(--gray);
    font-weight: 500;
}

/* ========== Alerts ========== */
.alert {
    padding: 15px 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alert .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.alert-info {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent);
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* ========== Hero Section ========== */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 50%, var(--darkest) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23667eea' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    color: var(--gray);
    font-size: 14px;
}

/* ========== Section ========== */
.section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
}

.section-title i {
    margin-right: 10px;
    color: var(--accent);
}

/* ========== Grid ========== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

/* Category Card */
.category-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--darker);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.category-card:hover {
    background: var(--darkest);
    transform: translateY(-3px);
    border-color: var(--primary);
}

.category-card i {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 12px;
    font-size: 20px;
    color: var(--white);
}

.category-card span {
    font-weight: 600;
    color: var(--white);
}

/* ========== Auth Pages ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--dark);
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: var(--darker);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header .logo {
    font-size: 32px;
    margin-bottom: 10px;
    justify-content: center;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--gray);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--gray);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 15px;
    font-size: 13px;
}

.auth-social {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-social .btn {
    flex: 1;
    padding: 12px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========== Wallet Page ========== */
.wallet-balance-card {
    background: var(--gradient);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
}

.wallet-balance-label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.wallet-balance-amount {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 30px;
}

.wallet-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.wallet-actions .btn {
    min-width: 150px;
}

/* ========== Tables ========== */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-completed, .status-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-cancelled, .status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-processing {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent);
}

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination a, .pagination span {
    padding: 10px 16px;
    background: var(--darker);
    border-radius: 8px;
    color: var(--light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--gradient);
    border-color: var(--primary);
    color: var(--white);
}

/* ========== Footer ========== */
.footer {
    background: var(--darker);
    padding: 60px 0 20px;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--accent);
}

.footer-col p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: var(--gray);
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-col ul a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--darkest);
    border-radius: 10px;
    color: var(--light);
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--gradient);
    transform: translateY(-3px);
}

.country-flags {
    display: flex;
    gap: 10px;
    font-size: 24px;
}

.payment-icons {
    display: flex;
    gap: 15px;
    font-size: 24px;
    color: var(--gray);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--gray);
    font-size: 13px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 15px;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        background: none;
        border: none;
        color: var(--white);
        font-size: 24px;
        cursor: pointer;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .wallet-balance-amount {
        font-size: 36px;
    }
    
    .wallet-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 25px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
}

/* ========== Utility Classes ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-accent { color: var(--accent); }
.text-white { color: var(--white); }

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.d-flex { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center { justify-content: center; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

.mobile-menu-btn {
    display: none;
}