/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B00;
    --primary-dark: #E55D00;
    --secondary-color: #4A90E2;
    --success-color: #2ECC71;
    --danger-color: #E74C3C;
    --dark-bg: #0F0F1E;
    --card-bg: #1A1A2E;
    --card-hover: #25254A;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0C3;
    --border-color: #2D2D44;
    --gradient-primary: linear-gradient(135deg, #FF6B00 0%, #FF8C42 100%);
    --gradient-card: linear-gradient(135deg, #1A1A2E 0%, #25254A 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.logo img {
    width: 40px;
    height: 40px;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.lang-selector select {
    background: var(--dark-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="white" stroke-opacity="0.05" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
}

/* Main Content */
.main {
    padding: 3rem 0;
}

.section {
    margin-bottom: 2rem;
}

.card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-number {
    background: var(--gradient-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
}

/* Player ID Form */
.player-id-form {
    max-width: 600px;
}

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

.form-input {
    flex: 1;
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-verify {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-verify:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.btn-verify:active {
    transform: translateY(0);
}

.player-info {
    background: var(--dark-bg);
    border: 2px solid var(--success-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.player-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.player-details {
    flex: 1;
}

.player-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.player-level {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-logout {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.btn-logout:active {
    transform: translateY(0);
}

.help-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.currency-info {
    background: var(--dark-bg);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* Telegram Section */
.telegram-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--dark-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.telegram-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.telegram-input {
    width: 100%;
    margin-bottom: 0.5rem;
}

.help-text-small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Referral Section */
.referral-section {
    margin-top: 1.5rem;
}

.referral-card {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.1) 0%, rgba(255, 140, 66, 0.05) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.referral-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.referral-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.referral-link-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.referral-input {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: monospace;
}

.btn-copy {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: inherit;
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.referral-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    background: var(--dark-bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.category-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
    position: relative;
    font-family: inherit;
}

.category-tab:hover {
    color: var(--text-primary);
}

.category-tab.active {
    color: var(--primary-color);
}

.category-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    padding-top: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card.selected {
    border-color: var(--primary-color);
    background: rgba(255, 107, 0, 0.1);
}

.product-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.product-image {
    width: 100%;
    height: 120px;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: var(--dark-bg);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Special offers grid - wider cards for images */
.products-grid:has(.product-image) {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-bonus {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.payment-method {
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    color: var(--text-primary);
}

.payment-method:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.payment-method.selected {
    border-color: var(--secondary-color);
    background: rgba(74, 144, 226, 0.1);
}

.payment-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.payment-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.payment-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.payment-surcharge {
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 107, 107, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    color: #FF6B6B;
    font-weight: 600;
}

.payment-method-surcharge {
    position: relative;
}

.payment-method-surcharge::after {
    content: '+30%';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Order Summary */
.order-summary {
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.summary-item span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.summary-total {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.summary-total span {
    color: var(--primary-color);
    font-weight: 800;
}

.btn-purchase {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1.5rem;
    font-family: inherit;
}

.btn-purchase:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-purchase:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.security-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.badge {
    background: var(--dark-bg);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Priority Queue Section */
.priority-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
}

.priority-checkbox {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

.priority-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 24px;
    width: 24px;
    background-color: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
}

.priority-checkbox:hover .checkmark {
    border-color: #FFC107;
}

.priority-checkbox input[type="checkbox"]:checked ~ .checkmark {
    background-color: #FFC107;
    border-color: #FFC107;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.priority-checkbox input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

.priority-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.priority-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.priority-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.priority-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFC107;
}

.priority-hint {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p,
.footer-section ul {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
}

.modal-body h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.order-details {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
}

.btn-secondary {
    background: var(--dark-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .payment-methods {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .section-title {
        font-size: 1.25rem;
    }

    .order-summary {
        position: static;
    }
}
