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

body {
    font-family: 'Segoe UI', 'Poppins', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ========== NAVIGATION ========== */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: #667eea;
    font-size: 1.6rem;
}

.logo span {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span span {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
}

.nav-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    padding: 8px 18px;
    border-radius: 40px;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a i {
    margin-right: 6px;
    font-size: 0.9rem;
}

.nav-links a:hover,
.nav-links a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
}

.admin-link {
    border: 1px solid #dc3545;
    color: #dc3545 !important;
    background: transparent;
}

.admin-link:hover {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545;
}

/* ========== HERO SECTION ========== */
.hero {
    padding: 80px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    animation: fadeInDown 0.8s ease;
}

.hero-content h1 span {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 32px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px 35px;
    border-radius: 20px;
    min-width: 150px;
    animation: fadeInUp 0.6s ease;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
    display: block;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ========== FEATURES SECTION ========== */
.features {
    padding: 80px 20px;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
    font-weight: 700;
}

.section-title span {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #f8f9fa;
    padding: 35px 25px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 35px;
    color: white;
}

.feature-card h3 {
    margin-bottom: 12px;
    color: #333;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* ========== HOW IT WORKS ========== */
.how-it-works {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: white;
    padding: 35px 25px;
    border-radius: 25px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.step-card:hover {
    transform: translateY(-8px);
}

.step-number {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto 20px;
}

.step-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    display: inline-block;
}

.step-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.step-card p {
    color: #666;
    line-height: 1.5;
}

/* ========== AUTH PAGES ========== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: white;
    border-radius: 25px;
    padding: 45px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.5s ease;
}

.admin-box {
    border-top: 5px solid #ff4757;
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-header i {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.auth-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
}

.auth-header p {
    color: #666;
}

.input-group {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s;
    background: white;
}

.input-group:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group i {
    padding: 0 15px;
    color: #667eea;
    font-size: 1.1rem;
}

.input-group input {
    width: 100%;
    padding: 14px 15px 14px 0;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
}

.auth-box button {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.auth-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========== DASHBOARD ========== */
.welcome-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 25px;
    padding: 35px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.5s ease;
}

.welcome-content h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.welcome-content p {
    opacity: 0.9;
}

.user-avatar i {
    font-size: 4.5rem;
    opacity: 0.9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 28px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.stat-card h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    font-weight: 500;
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.tab-btn {
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    color: #333;
}

.tab-btn i {
    margin-right: 8px;
}

.tab-btn:hover {
    background: white;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

/* ========== API CARDS ========== */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 25px;
}

.api-card {
    background: white;
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    animation: fadeInUp 0.7s ease;
}

.api-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.api-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.api-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.api-icon i {
    font-size: 28px;
    color: white;
}

.api-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #333;
}

.api-info p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.price-calculator {
    margin: 20px 0;
}

.price-calculator label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.price-calculator select,
.price-calculator input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.price-calculator select:focus,
.price-calculator input:focus {
    border-color: #667eea;
    outline: none;
}

.total-price {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
}

.payment-fields input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.payment-fields input:focus {
    border-color: #667eea;
    outline: none;
}

.btn-buy {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-buy:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* ========== KEY CARDS ========== */
.key-card {
    background: white;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    animation: fadeInUp 0.5s ease;
}

.key-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.key-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.key-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-icon i {
    font-size: 22px;
    color: white;
}

.key-service {
    flex: 1;
}

.key-service h4 {
    margin: 0 0 6px;
    color: #333;
}

.key-service code {
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
}

.key-status {
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.key-status.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.key-status.expired {
    background: #ffebee;
    color: #c62828;
}

.key-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 18px 0;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar .progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.key-url {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.key-url code {
    font-size: 0.7rem;
    word-break: break-all;
    flex: 1;
}

.key-actions {
    text-align: right;
    margin-top: 10px;
}

.test-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.test-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* ========== HISTORY TABLE ========== */
.history-table-container {
    background: white;
    border-radius: 20px;
    overflow-x: auto;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-table th {
    padding: 14px 12px;
    text-align: left;
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.history-table .amount {
    color: #28a745;
    font-weight: 600;
}

/* ========== ADMIN PANEL ========== */
.admin-nav {
    background: #1a1a2e;
}

.admin-nav .logo span {
    -webkit-text-fill-color: white;
    background: none;
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 280px;
    background: #1a1a2e;
    padding: 25px;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #aaa;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.sidebar .menu-item i {
    width: 22px;
}

.sidebar .menu-item:hover,
.sidebar .menu-item.active {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.main-content {
    flex: 1;
    padding: 25px;
    background: #f5f5f5;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: white;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.stat-box:hover {
    transform: translateY(-3px);
}

.stat-box i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 12px;
}

.stat-box h3 {
    font-size: 1.8rem;
    margin: 8px 0;
    color: #333;
}

.table-container {
    background: white;
    border-radius: 20px;
    overflow-x: auto;
    padding: 20px;
    margin-top: 15px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* ========== FOOTER ========== */
footer {
    background: #1a1a2e;
    color: white;
    padding: 50px 20px 25px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 18px;
    color: white;
}

.footer-section a {
    display: block;
    color: #aaa;
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #333;
    margin-top: 30px;
    color: #aaa;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .stat-item {
        padding: 12px 20px;
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
        overflow-x: auto;
        display: flex;
        gap: 5px;
        padding: 15px;
    }
    
    .sidebar .menu-item {
        white-space: nowrap;
    }
    
    .key-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .welcome-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        justify-content: center;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}