/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

.btn-login, .btn-register {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.btn-login {
    background-color: transparent;
    border: 2px solid white;
}

.btn-register {
    background-color: white;
    color: #667eea;
}

.btn-logout {
    background-color: #ff4757;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #333;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Products Section */
.products-section {
    padding: 4rem 0;
}

.products-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image i {
    font-size: 4rem;
    color: white;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.product-desc {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
}

.btn-buy {
    display: block;
    text-align: center;
    background: #667eea;
    color: white;
    padding: 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-buy:hover {
    background: #5a6fd8;
}

/* Dashboard Styles */
.dashboard {
    display: flex;
    min-height: calc(100vh - 200px);
    margin: 2rem auto;
}

.sidebar {
    width: 250px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-right: 2rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    border-bottom: 1px solid #eee;
}

.sidebar li:last-child {
    border-bottom: none;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar a:hover,
.sidebar li.active a {
    background-color: #f5f7fa;
    color: #667eea;
}

.sidebar i {
    width: 20px;
}

.main-content {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.5rem;
    color: white;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.stat-info p {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: #f5f7fa;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

/* Status Badges */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-completed,
.status-available,
.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-failed,
.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Affiliate Section */
.affiliate-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.referral-link {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.referral-link input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f5f7fa;
}

.btn-copy {
    background: #667eea;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-text {
    color: #666;
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
}



/* Dashboard Sections */
.dashboard-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.dashboard-section h2 {
    margin-bottom: 1rem;
    color: #333;
}

/* Withdrawal Form */
.withdrawal-form {
    background: #f5f7fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Add to existing CSS */
.btn-back {
    color: #667eea;
    text-decoration: none;
    margin-right: 1rem;
}

.btn-back:hover {
    text-decoration: underline;
}

.ticket-form,
.reply-form {
    background: #f5f7fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.ticket-message {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.admin-reply {
    background: #e8f4fd;
    border-color: #3498db;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.message-time {
    color: #666;
    font-size: 0.9rem;
}

.admin-badge {
    background: #3498db;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}


.product-image-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.product-image-large i {
    font-size: 6rem;
    color: white;
}

/* For product cards */
.product-card .product-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}
/* Default product image styling */
.fa-file-alt {
    font-size: 6rem;
    color: white;
    opacity: 0.8;
}

/* For product cards in grid */
.products-grid .product-image {
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px 8px 0 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
}