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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --border: #e5e7eb;
}

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

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.logo img {
    max-height: 50px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.category-dropdown {
    position: relative;
}

.category-dropdown select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.search-box {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}

.search-box button {
    padding: 1rem 2rem;
    background: var(--secondary);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-box button:hover {
    transform: scale(1.05);
}

/* Category Tabs */
.category-tabs {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.category-tab {
    padding: 0.5rem 1.5rem;
    background: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-tab.active,
.category-tab:hover {
    background: var(--primary);
    color: white;
}

/* Coupon Grid */
.coupon-grid {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Coupon Card - Ticket Style */
.coupon-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

/* Dashed border and punch-hole effect */
.coupon-card::before,
.coupon-card::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, var(--primary) 2px, transparent 2.5px);
    background-size: 8px 8px;
    bottom: 20px;
}

.coupon-card::before {
    left: -15px;
}

.coupon-card::after {
    right: -15px;
}

.coupon-content {
    padding: 1.5rem;
    border: 2px dashed var(--border);
    margin: 10px;
    border-radius: 12px;
}

.coupon-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.coupon-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.coupon-code {
    background: #f3f4f6;
    padding: 0.75rem;
    text-align: center;
    font-family: monospace;
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: 8px;
    margin: 1rem 0;
    position: relative;
}

.copy-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: #0d9488;
}

.expiry {
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 1rem;
    text-align: center;
}

.expiry.urgent {
    color: var(--danger);
    font-weight: bold;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

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

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #374151;
}

/* Admin Panel Styles */
.admin-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.admin-header {
    background: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-nav a {
    text-decoration: none;
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary);
    color: white;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
}

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

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--light);
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

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

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

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

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 1rem 0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .coupon-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
    z-index: 2000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}