/* ====================
   Base Styles
   ==================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    margin: 20px auto;
    max-width: 1200px;
    padding: 0 15px;
}

.ul {
    margin: 15px 5px;
    padding-left: 20px;
}

.li {
    margin-bottom: 10px;
    padding-left: 15px;
}

/* ====================
   Alerts
   ==================== */
.alert {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====================
   Button System
   ==================== */
/* Base button structure - no colors */
.btn-base {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    height: 34px;
    line-height: 1;
    box-sizing: border-box;
}

/* Color variants */
.btn-primary {
    background-color: #4e6cce;
    color: white;
}

.btn-primary:hover {
    background-color: #3a5bbf;
}

.btn-secondary {
    background-color: #9cb9e7;
    color: white;
}

.btn-secondary:hover {
    background-color: #93b5ec;
}

.btn-logout {
    background-color: #b250d0;
    color: white;
}

.btn-logout:hover {
    background-color: #c82333;
}

.btn-signup-login {
    background-color: #b19cd9;
    color: white;
}

.btn-signup-login:hover {
    background-color: #9d8bc4;
}

/* Button spacing utilities */
.btn-go-back {
    margin-right: 16px;
    margin-left: 16px;
}

.btn-spacing {
    margin-right: 12px;
}

/* Button containers */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.button-group {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.button-nav-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

/* ====================
   Navigation Buttons (Consolidated)
   ==================== */
.button-nav-container {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar once */
.button-nav-container::-webkit-scrollbar {
    display: none;
}

.nav-btn {
    background-color: #b19cd9;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.9rem;
    flex-shrink: 0;
    text-align: center;
    min-width: max-content;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: #9d8bc4;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .button-nav-container {
        gap: 4px;
        padding: 8px 10px;
    }
    
    .nav-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .nav-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .nav-btn {
        padding: 5px 6px;
        font-size: 0.75rem;
    }
}

/* Hide scrollbar for Chrome/Safari */
.button-nav-container::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .nav-btn {
        padding: 4px 8px;
        font-size: 0.85rem;
    }
}

/* ====================
   Spinners & Loaders
   ==================== */
.button-spinner,
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ====================
   Content Sections
   ==================== */
.card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
    padding: 20px;
}

.category {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
    background-color: #f9f9f9;
}

/* ====================
   Lists
   ==================== */
.list-group-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.names-list,
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlighted {
    color: #d32f2f !important;
    font-weight: bold;
    background: #ffebee !important;
}

/* ====================
   Upload Components
   ==================== */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.upload-button {
    display: inline-block;
    padding: 6px 10px;
    margin-bottom: 2px;
    background-color: #f8f9fa;
    color: #006f75;
    border: 2px solid #006f75;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-button:hover {
    background-color: #006f75;
    color: white;
}

.upload-status {
    margin-top: 0px;
    color: #006f75;
    font-size: 0.9rem;
}

/* ====================
   Utility Classes
   ==================== */
.d-none {
    display: none !important;
}

.text-center {
    text-align: center;
}