/* Ms Greenwave Pageant Scoreboard - Summerville High School Green Wave Theme */

:root {
    /* SHS Green Wave Colors */
    --greenwave-primary: #006747; /* Deep Green */
    --greenwave-secondary: #00A859; /* Bright Green */
    --greenwave-accent: #00C9A7; /* Teal Accent */
    --greenwave-dark: #004A35; /* Dark Green */
    --greenwave-light: #E8F5E9; /* Light Green Background */
    --greenwave-gold: #FFD700; /* Gold for awards/rankings */
    --text-dark: #212529;
    --text-light: #ffffff;
    --border-color: #dee2e6;
    --navbar-height: 70px;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--greenwave-light) 0%, #ffffff 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding-top: var(--navbar-height);
}

/* Custom Green Wave Navbar */
.greenwave-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: linear-gradient(135deg, var(--greenwave-primary) 0%, var(--greenwave-secondary) 100%);
    box-shadow: 0 4px 12px rgba(0, 103, 71, 0.2);
    z-index: 1000;
}

.greenwave-navbar .container-fluid {
    height: 100%;
    padding: 0 2rem;
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    color: var(--text-light);
    transform: scale(1.05);
}

.navbar-brand i {
    font-size: 2rem;
    color: var(--greenwave-gold);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

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

.brand-main {
    font-size: 1.3rem;
    font-weight: 700;
}

.brand-sub {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* Desktop Navigation Links */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-links .nav-link,
.navbar-links .logout-btn {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.navbar-links .nav-link:hover,
.navbar-links .logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.navbar-links .nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.navbar-links .nav-link i {
    font-size: 1.1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--greenwave-primary) 0%, var(--greenwave-secondary) 100%);
    box-shadow: 0 8px 16px rgba(0, 103, 71, 0.3);
    padding: 1rem 0;
    animation: slideDown 0.3s ease;
}

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

.mobile-nav-link {
    display: flex;
    align-items: center;
    color: var(--text-light);
    text-decoration: none;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 2.5rem;
}

.mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    border-left: 4px solid var(--greenwave-gold);
}

.mobile-nav-link i {
    font-size: 1.3rem;
}

/* Footer */
.greenwave-footer {
    background: linear-gradient(135deg, var(--greenwave-dark) 0%, var(--greenwave-primary) 100%);
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: 3rem;
}

.greenwave-footer p {
    margin: 0;
}

.greenwave-footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Winnss Built By Badge */
.footer-badge {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.built-by-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.built-by-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.winnss-logo {
    height: 20px;
    width: auto;
    vertical-align: middle;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

/* Responsive Utilities */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

/* Header Branding */
.greenwave-header {
    background: linear-gradient(135deg, var(--greenwave-primary) 0%, var(--greenwave-secondary) 100%);
    color: var(--text-light);
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.greenwave-header h1 {
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.greenwave-header .lead {
    font-weight: 300;
    opacity: 0.95;
    margin: 0;
}

.greenwave-subtitle {
    color: var(--greenwave-accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 103, 71, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 103, 71, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--greenwave-primary) 0%, var(--greenwave-secondary) 100%);
    color: var(--text-light);
    border: none;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-header h4 {
    margin: 0;
    font-size: 1.25rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--greenwave-primary) 0%, var(--greenwave-secondary) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 103, 71, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--greenwave-dark) 0%, var(--greenwave-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 103, 71, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--greenwave-secondary) 0%, var(--greenwave-accent) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 168, 89, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--greenwave-primary) 0%, var(--greenwave-secondary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 89, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--greenwave-primary);
    color: var(--greenwave-primary);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--greenwave-primary);
    color: var(--text-light);
    border-color: var(--greenwave-primary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Alerts */
.alert-success {
    background: linear-gradient(135deg, var(--greenwave-light) 0%, #d4edda 100%);
    border: 2px solid var(--greenwave-secondary);
    border-radius: 10px;
    color: var(--greenwave-dark);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fffaeb 100%);
    border: 2px solid var(--greenwave-gold);
    border-radius: 10px;
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, var(--greenwave-light) 0%, #d1ecf1 100%);
    border: 2px solid var(--greenwave-accent);
    border-radius: 10px;
    color: var(--greenwave-primary);
}

/* Forms */
.form-label {
    color: var(--greenwave-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--greenwave-secondary);
    box-shadow: 0 0 0 0.25rem rgba(0, 168, 89, 0.15);
}

/* Rankings/Results */
.rank-badge {
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rank-1 {
    background: linear-gradient(135deg, var(--greenwave-gold) 0%, #FFA500 100%);
    color: #000;
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    color: #000;
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    color: #fff;
}

.rank-other {
    background: linear-gradient(135deg, var(--greenwave-primary) 0%, var(--greenwave-secondary) 100%);
    color: var(--text-light);
}

/* List Items */
.list-group-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: var(--greenwave-light);
    transform: translateX(4px);
}

.contestant-scored {
    background-color: var(--greenwave-light);
    opacity: 0.7;
    border: 2px solid var(--greenwave-secondary);
}

/* Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    margin: 0.25rem;
    transition: all 0.3s ease;
}

.category-badge:hover {
    transform: scale(1.05);
}

.category-interview {
    background: linear-gradient(135deg, #6A1B9A 0%, #8E24AA 100%);
    color: white;
}

.category-evening {
    background: linear-gradient(135deg, #C62828 0%, #E53935 100%);
    color: white;
}

.category-fun {
    background: linear-gradient(135deg, #F57C00 0%, #FB8C00 100%);
    color: white;
}

/* Trophy/Success Icons */
.trophy-icon {
    color: var(--greenwave-gold);
    font-size: 3rem;
    animation: pulse 2s infinite;
}

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

/* Mobile Optimizations */
@media (max-width: 767.98px) {
    /* Navbar Mobile */
    .greenwave-navbar .container-fluid {
        padding: 0 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-brand i {
        font-size: 1.5rem;
    }
    
    .brand-main {
        font-size: 1rem;
    }
    
    .brand-sub {
        font-size: 0.65rem;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu {
        display: block;
    }
    
    /* Footer Mobile */
    .greenwave-footer {
        padding: 1.5rem 0;
        font-size: 0.9rem;
    }
    
    .built-by-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .winnss-logo {
        height: 16px;
    }
    
    /* Content Mobile */
    .greenwave-header {
        padding: 1rem 0;
    }
    
    .greenwave-header h1 {
        font-size: 1.75rem;
    }
    
    .greenwave-header .lead {
        font-size: 1rem;
    }
    
    .card-header h4 {
        font-size: 1.1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .rank-badge {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    /* Stack buttons vertically on mobile */
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group-mobile .btn {
        width: 100%;
        margin: 0 !important;
    }
    
    /* Better mobile spacing */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile tables */
    .table-responsive {
        font-size: 0.85rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .greenwave-navbar .container-fluid {
        padding: 0 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-links .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .greenwave-header h1 {
        font-size: 2.25rem;
    }
    
    .card-header h4 {
        font-size: 1.2rem;
    }
}

/* Desktop Optimizations */
@media (min-width: 1024px) {
    .container {
        max-width: 1140px;
    }
    
    .card {
        margin-bottom: 2rem;
    }
}

/* Login Page Specific */
.login-card {
    max-width: 450px;
    margin: 0 auto;
    margin-top: 3rem;
}

.login-header {
    background: linear-gradient(135deg, var(--greenwave-primary) 0%, var(--greenwave-secondary) 100%);
    text-align: center;
    padding: 2rem;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 767.98px) {
    .login-card {
        margin-top: 1rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .login-header {
        padding: 1.5rem;
    }
    
    .login-logo {
        font-size: 2rem;
    }
}

/* Spinner/Loading */
.spinner-border {
    border-color: var(--greenwave-secondary);
    border-right-color: transparent;
}

/* Utilities */
.text-greenwave {
    color: var(--greenwave-primary) !important;
}

.bg-greenwave {
    background: linear-gradient(135deg, var(--greenwave-primary) 0%, var(--greenwave-secondary) 100%) !important;
}

.border-greenwave {
    border-color: var(--greenwave-secondary) !important;
}

/* Responsive Navigation/Links */
.nav-link {
    color: var(--greenwave-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--greenwave-secondary);
    transform: translateY(-2px);
}

/* Score Input Enhancement */
input[type="number"].form-control {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    color: var(--greenwave-primary);
}

/* Accessibility */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: 3px solid var(--greenwave-accent);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .greenwave-header {
        background: white;
        color: black;
    }
    
    .btn, .alert {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ===================================
   Mobile Results View - Compact & Expandable
   =================================== */

/* Hide mobile view on desktop, show desktop view */
.mobile-results-view {
    display: none;
}

.desktop-results-view {
    display: block;
}

/* Mobile Result Cards */
.mobile-result-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 103, 71, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-result-card:active {
    transform: scale(0.98);
}

.mobile-result-card.expanded {
    box-shadow: 0 4px 16px rgba(0, 103, 71, 0.2);
}

.mobile-result-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(0, 103, 71, 0.03) 0%, rgba(0, 168, 89, 0.03) 100%);
}

.mobile-rank-section {
    flex-shrink: 0;
}

.mobile-contestant-info {
    flex: 1;
    min-width: 0;
}

.mobile-contestant-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--greenwave-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-total-score {
    font-size: 0.95rem;
    color: #666;
}

.mobile-total-score strong {
    font-size: 1.25rem;
    color: var(--greenwave-secondary);
    font-weight: 700;
}

.mobile-expand-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: var(--greenwave-secondary);
    transition: transform 0.3s ease;
}

/* Expanded Details Section */
.mobile-result-details {
    padding: 0 1rem 1rem 1rem;
    border-top: 2px solid var(--greenwave-light);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.score-breakdown-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--greenwave-dark);
    margin: 1rem 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-category-score {
    background: var(--greenwave-light);
    border-left: 4px solid var(--greenwave-secondary);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
}

.mobile-category-score:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.interview-badge {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
}

.gown-badge {
    background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
}

.fashion-badge {
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
}

.category-weight {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.category-score-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--greenwave-primary);
    padding-left: 0.25rem;
}

/* Mobile Breakpoint - Show mobile view, hide desktop */
@media (max-width: 767px) {
    .mobile-results-view {
        display: block;
    }
    
    .desktop-results-view {
        display: none;
    }
    
    /* Adjust rank badges for mobile */
    .rank-badge {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .rank-badge i {
        font-size: 1.3rem;
    }
}
