
/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* =========================================
   VARIABLES
   ========================================= */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

.main-wrapper {
    min-height: calc(100vh - 140px);
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: white;
    font-size: 1.2rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.3rem;
    font-weight: 800;
}

.brand-subtitle {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray);
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gray-light);
    border: none;
    border-radius: 8px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.my-cards-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: var(--radius);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.welcome-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* =========================================
   STATS
   ========================================= */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 150px;
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   EVENTS GRID
   ========================================= */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

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

.event-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.event-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.event-badge.today {
    background: var(--success);
}

.event-badge.tomorrow {
    background: var(--warning);
}

.event-badge.past {
    background: var(--gray);
}

.event-image-container {
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-image {
    transform: scale(1.05);
}

.event-content {
    padding: 20px;
}

.event-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.event-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.event-description {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.event-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
}

.participants-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
    font-size: 0.9rem;
}

.event-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--dark);
}

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

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* =========================================
   FORMS
   ========================================= */
.form-container {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-icon {
    position: relative;
}

.input-icon .fas {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* =========================================
   CAMERA UI
   ========================================= */
.camera-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 9/16;
    background: #000;
    margin: 20px auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.camera-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    pointer-events: none;
    z-index: 5;
}

.camera-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 10;
}

.capture-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: white;
    border: 4px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    position: relative;
}

.capture-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
}

.switch-btn, .flash-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flash-btn.active {
    background: rgba(255, 255, 255, 0.8);
    color: #000;
}

/* =========================================
   SHARE PAGE
   ========================================= */
.share-container {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}

.success-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-preview-container {
    margin: 30px auto;
    max-width: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.final-image {
    width: 100%;
    height: auto;
    display: block;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.share-btn i {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.whatsapp-btn { background: #25D366; }
.facebook-btn { background: #1877F2; }
.instagram-btn { background: linear-gradient(45deg, #E4405F, #C13584); }
.twitter-btn { background: #1DA1F2; }
.download-btn { background: #333; }
.native-btn { 
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    grid-column: 1 / -1;
    padding: 25px;
}

.link-container {
    margin: 25px 0;
    padding: 20px;
    background: var(--gray-light);
    border-radius: var(--radius);
}

.link-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray);
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: center;
}

.copy-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.user-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 25px 0;
    padding: 20px;
    background: var(--gray-light);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.stat-item-small {
    text-align: center;
}

.stat-number-small {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stat-label-small {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 5px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

/* =========================================
   MY CARDS PAGE
   ========================================= */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.user-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
}

.user-info h3 {
    margin: 0;
    font-size: 1.2rem;
}

.user-info p {
    margin: 5px 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.card-body {
    padding: 20px;
}

.event-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background: white;
    padding: 40px 20px;
    margin-top: 50px;
    border-top: 1px solid var(--gray-light);
}

.marketing-box {
    margin-top: 20px;
    padding: 15px;
    background: #fff8e1;
    color: #5d4037;
    border-radius: 8px;
    font-size: 0.95rem;
    border: 1px solid #ffe0b2;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.text-center { text-align: center; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

.hidden {
    display: none !important;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.animate-pop {
    animation: pulse 2s infinite;
}

.slide-up {
    animation: slideIn 0.5s ease;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .event-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        gap: 20px;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 15px;
    }
    
    .nav-btn span {
        display: none;
    }
    
    .nav-btn {
        padding: 8px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .share-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .camera-container {
        max-width: 100%;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 15px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .share-grid {
        grid-template-columns: 1fr;
    }
    
    .share-btn {
        padding: 15px;
    }
    
    .user-stats {
        gap: 20px;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 20px;
    }
}
