:root {
    --primary: #e74c8b;
    --primary-dark: #c93a73;
    --bg: #faf5f7;
    --card-bg: #fff;
    --text: #2d2d2d;
    --text-light: #777;
    --border: #eee;
    --success: #27ae60;
    --danger: #e74c3c;
    --radius: 12px;
}

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

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

main { flex: 1; max-width: 960px; margin: 0 auto; padding: 2rem 1rem; width: 100%; }

/* Navbar */
.navbar {
    background: var(--primary);
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo { color: #fff; text-decoration: none; font-size: 1.4rem; font-weight: 700; }
.nav-links a { color: rgba(255,255,255,0.9); text-decoration: none; margin-left: 1.5rem; }
.nav-links a:hover { color: #fff; }

/* Footer */
.footer { text-align: center; padding: 2rem; color: var(--text-light); font-size: 0.9rem; }

/* Flash */
.flash-messages { max-width: 960px; margin: 1rem auto; padding: 0 1rem; }
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 0.5rem; }
.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
.btn:hover { background: var(--primary-dark); }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #545b62; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: 3rem;
}
.hero h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.hero-sub { font-size: 1.3rem; opacity: 0.9; margin-bottom: 1rem; }
.hero-desc { max-width: 600px; margin: 0 auto; opacity: 0.85; }

/* Steps */
.how-it-works { text-align: center; }
.how-it-works h2 { font-size: 1.8rem; margin-bottom: 2rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.step { background: var(--card-bg); padding: 2rem; border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.step-num {
    width: 40px; height: 40px; background: var(--primary); color: #fff;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem;
}
.step h3 { margin-bottom: 0.5rem; }

/* Event page */
.event-header { text-align: center; margin-bottom: 2rem; }
.event-header h1 { font-size: 2.2rem; }
.event-date { color: var(--text-light); }
.event-desc { margin-top: 0.5rem; }
.event-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; margin-bottom: 3rem; }
.qr-section, .sms-section {
    text-align: center; background: var(--card-bg); padding: 2rem;
    border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.qr-code { max-width: 200px; margin: 1rem auto; display: block; }
.qr-url { font-size: 0.8rem; color: var(--text-light); word-break: break-all; }
.sms-number { font-size: 2rem; font-weight: 700; color: var(--primary); margin: 0.5rem 0; }
.status-active { color: var(--success); font-weight: 600; }
.status-inactive { color: var(--text-light); }

/* Photo grid */
.photo-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem; margin: 1.5rem 0;
}
.gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.photo-thumb img, .photo-admin-item img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: var(--radius); transition: transform 0.2s;
}
.photo-thumb:hover img { transform: scale(1.03); }
.photo-admin-item { text-align: center; }
.photo-admin-item .btn { margin-top: 0.5rem; }
.empty { color: var(--text-light); font-style: italic; padding: 2rem; text-align: center; }

/* Photo page */
.photo-page { text-align: center; }
.photo-view img { max-width: 100%; max-height: 70vh; border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.photo-info { margin-top: 1.5rem; }
.photo-date { color: var(--text-light); margin-bottom: 1rem; }
.photo-actions { display: flex; gap: 1rem; justify-content: center; }

/* Trigger page */
.trigger-page { text-align: center; padding: 2rem 0; }
.trigger-sub { color: var(--text-light); margin-bottom: 2rem; font-size: 1.1rem; }
.trigger-button {
    width: 200px; height: 200px; border-radius: 50%;
    background: var(--primary); color: #fff; border: none;
    cursor: pointer; display: flex; flex-direction: column;
    align-items: center; justify-content: center; margin: 0 auto 2rem;
    font-size: 1.2rem; transition: all 0.3s; box-shadow: 0 8px 30px rgba(231,76,139,0.4);
}
.trigger-button:hover { transform: scale(1.05); box-shadow: 0 12px 40px rgba(231,76,139,0.5); }
.trigger-button:active, .trigger-button.triggered {
    transform: scale(0.95); background: var(--primary-dark);
}
.trigger-button:disabled { opacity: 0.6; cursor: not-allowed; }
.trigger-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.trigger-status { font-size: 1.1rem; color: var(--text-light); min-height: 1.5em; }
.latest-photo { margin-top: 2rem; }
.latest-photo img { max-width: 400px; width: 100%; border-radius: var(--radius); margin: 1rem 0; }

/* Admin */
.admin-page h1 { margin-bottom: 1.5rem; }
.stats-row { display: flex; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.stat-card {
    background: var(--card-bg); padding: 1.5rem 2rem; border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); text-align: center; min-width: 120px;
}
.stat-num { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--text-light); }

.event-list { display: grid; gap: 1rem; margin-top: 1rem; }
.event-card {
    background: var(--card-bg); padding: 1.5rem; border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.event-card h3 { margin-bottom: 0.3rem; }
.event-card p { color: var(--text-light); font-size: 0.9rem; }
.event-card code { background: #f1f1f1; padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.85rem; }
.event-badges { margin: 0.5rem 0; display: flex; gap: 0.5rem; }
.badge {
    padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.badge-sms { background: #dbeafe; color: #1e40af; }
.badge-web { background: #d1fae5; color: #065f46; }
.event-actions-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

/* Forms */
.form-section { background: var(--card-bg); padding: 2rem; border-radius: var(--radius); margin-bottom: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.event-form .form-group { margin-bottom: 1rem; }
.event-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; }
.event-form input[type="text"],
.event-form input[type="date"],
.event-form textarea {
    width: 100%; padding: 0.6rem; border: 1px solid var(--border);
    border-radius: 8px; font-size: 1rem;
}
.form-row { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
.form-row label { font-weight: normal; display: flex; align-items: center; gap: 0.4rem; }
.upload-form { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; flex-wrap: wrap; }
.overlay-list { margin: 1rem 0; }
.overlay-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem; border-bottom: 1px solid var(--border);
}

/* Login */
.login-page { text-align: center; padding: 4rem 0; }
.login-form { max-width: 300px; margin: 2rem auto; }
.login-form input { width: 100%; padding: 0.7rem; margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; }

hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .steps { grid-template-columns: 1fr; }
    .trigger-button { width: 160px; height: 160px; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
