/* KANLAON ASHFALL TRACKER - MAIN STYLES */

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

:root {
    --lava-red: #ef4444;
    --orange-glow: #f97316;
    --ash-gray: #1f2937;
    --dark-bg: #111827;
    --darker-bg: #0a0e1a;
    --text-light: #f3f4f6;
    --text-gray: #9ca3af;
    --success: #10b981;
    --warning: #fbbf24;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    color: var(--text-light);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== ANIMATED ASH PARTICLES ===== */
.ash-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(239, 68, 68, 0.3);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--lava-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--orange-glow);
}

.btn-admin-login {
    background: rgba(249, 115, 22, 0.2);
    color: var(--orange-glow);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--orange-glow);
}

.btn-admin-login:hover {
    background: var(--orange-glow);
    color: white;
}

.user-welcome,
.admin-welcome {
    color: var(--orange-glow);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--lava-red);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 200px);
}

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    padding: 5rem 0;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    border-bottom: 2px solid rgba(239, 68, 68, 0.3);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--lava-red), var(--orange-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== SECTIONS ===== */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--lava-red);
}

.bg-dark {
    background: rgba(10, 14, 26, 0.5);
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(249, 115, 22, 0.1) 100%);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 2px solid rgba(239, 68, 68, 0.3);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* ===== CARDS ===== */
.card {
    background: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.card-text {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-meta {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card-date {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* ===== GRIDS ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.badge-moderate {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid #fbbf24;
}

.badge-high {
    background: rgba(249, 115, 22, 0.2);
    color: var(--orange-glow);
    border: 1px solid var(--orange-glow);
}

.badge-critical {
    background: rgba(239, 68, 68, 0.2);
    color: var(--lava-red);
    border: 1px solid var(--lava-red);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--lava-red), var(--orange-glow));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(31, 41, 55, 0.8);
    color: var(--text-light);
    border: 1px solid var(--lava-red);
}

.btn-secondary:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--lava-red);
    border: 2px solid var(--lava-red);
}

.btn-outline:hover {
    background: var(--lava-red);
    color: white;
}

.btn-login {
    background: linear-gradient(135deg, var(--lava-red), var(--orange-glow));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.2);
    color: var(--lava-red);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--lava-red);
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* ===== TABLES ===== */
.alerts-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
}

thead {
    background: rgba(239, 68, 68, 0.2);
}

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

th {
    color: var(--orange-glow);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

td {
    color: var(--text-gray);
}

tr:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ===== TEXT UTILITIES ===== */
.text-center {
    text-align: center;
}

.no-data {
    text-align: center;
    color: var(--text-gray);
    padding: 3rem;
    font-size: 1.1rem;
}

.no-data-container {
    background: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 3rem;
}

/* ===== EDUCATION PAGE ===== */
.education-content {
    display: grid;
    gap: 2rem;
}

.education-card {
    background: rgba(31, 41, 55, 0.7);
}

.education-card h2 {
    color: var(--orange-glow);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.education-card ul {
    list-style: none;
    padding-left: 0;
}

.education-card li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-gray);
    line-height: 1.6;
}

.education-card li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--lava-red);
    font-weight: bold;
}

/* ===== AUTH PAGES ===== */
.auth-section {
    padding: 4rem 0;
    min-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
}

.auth-card {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 3rem;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--lava-red);
}

.auth-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.auth-form {
    margin-top: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(10, 14, 26, 0.6);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--lava-red);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-gray);
}

.auth-footer a {
    color: var(--lava-red);
    text-decoration: none;
}

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

.auth-divider {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-info {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
}

.auth-info code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--orange-glow);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-gray);
    font-size: 0.85rem;
}

/* ===== GLOBAL ALERTS ===== */
.global-alert {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 9999;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

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

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--lava-red);
    color: var(--lava-red);
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

/* ===== FOOTER ===== */
.footer {
    background: rgba(10, 14, 26, 0.8);
    border-top: 1px solid rgba(239, 68, 68, 0.3);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-gray);
    position: relative;
    z-index: 10;
}

.footer p {
    margin: 0.5rem 0;
}

/* ===== SAFE ZONE CARDS ===== */
.safezone-card {
    background: rgba(31, 41, 55, 0.7);
}

.safezone-details {
    margin: 1rem 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(31, 41, 55, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: right 0.3s ease;
    }

    .nav-menu.active {
        right: 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .grid,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }

    .section {
        padding: 2rem 0;
    }

    .card {
        padding: 1.5rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }
}