/* Base styles and variable definitions */
:root {
    --bg-color: #085b65;
    --nb-bg-color: #043237;
    --card-bg: #ffffff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
}

/* Navigation link layout & Reactive Responsive Header */
.navbar {
    background-color: var(--nb-bg-color);
    color: white;
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}

.nav-brand-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.brand-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 6px 5px;
    cursor: pointer;
    width: 36px;
    height: 32px;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: space-between;
}

.nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    margin-left: 2rem;
    gap: 1.5rem;
}

.nav-links-pages {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-item {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: inline-block;
}

.nav-item:hover,
.nav-item:focus-visible {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    outline: none;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.user-badge {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
}

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

.nav-btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.nav-btn-logout {
    border-color: rgba(220, 38, 38, 0.6);
    color: #fee2e2;
}

.nav-btn-logout:hover {
    background-color: rgba(220, 38, 38, 0.25);
    border-color: var(--danger);
    color: #ffffff;
}

/* Reactive Mobile Breakpoint */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem 1.25rem;
    }

    .nav-brand-group {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-left: 0;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        gap: 0.75rem;
    }

    .nav-menu.nav-menu-open {
        display: flex;
    }

    .nav-links-pages {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }

    .nav-item {
        width: 100%;
        box-sizing: border-box;
        padding: 0.65rem 0.75rem;
    }

    .nav-auth {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-left: 0;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .user-badge {
        text-align: center;
        margin-bottom: 0.25rem;
        word-break: break-all;
    }

    .nav-btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 0.65rem;
    }
}

.container {
    max-width: 820px;
    margin: 2rem auto;
    padding: 1.5rem;
    border-radius: 8px;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)), 
        url('../images/crimany.png');
    background-size: contain;
    background-position: center;
    background-position-y: top;
    background-repeat: no-repeat;
    color: #ffffff; 
}

.card {
    background-color: rgba(255, 255, 255, 0.9); 
    color: var(--text);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mt {
    margin-top: 1.5rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
}

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

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

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

.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.item-card:last-child {
    border-bottom: none;
}

.item-card h3 {
    margin: 0 0 0.25rem 0;
}

.item-card p {
    margin: 0;
    color: var(--text-muted);
    background-color: #ffffff;
}

.empty-state {
    color: var(--text-muted);
    font-style: italic;
}

/* Authentication Card Sizing */
.auth-card {
    max-width: 400px;
    margin: 2rem auto;
}

.auth-footer {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Flash alerts */
.flash-wrapper {
    margin-bottom: 1rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.alert-success { background-color: #d1fae5; color: #065f46; }
.alert-danger { background-color: #fee2e2; color: #991b1b; }
.alert-info { background-color: #e0f2fe; color: #075985; }
.alert-warning { background-color: #fef3c7; color: #92400e; }

/* Guides Page Styles */
.guides-card {
    padding: 2rem 1.5rem;
}

.guides-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.guides-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.6rem;
}

.guides-subtitle {
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
    font-size: 0.95rem;
}

.guides-dropdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.guides-select {
    width: 100%;
    max-width: 480px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid var(--border);
    border-radius: 8px;
    background-color: #ffffff;
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.guides-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.video-playback-section {
    margin-top: 1.5rem;
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    margin-top: 1rem;
    text-align: center;
}

.video-caption h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text);
}

/* Accessibility helper */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
