@font-face {
    font-family: 'Tanseek Sans Pro ExtraBold';
    src: url('../../fonts/tanseek-extra-bold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'OutlastRegular';
    src: url('../../fonts/OutlastRegular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Modern Color Palette & Variables */
:root {
    /* Base Backgrounds - Deep Rich Slate/Navy */
    --bg-dark: #0f172a;
    /* Deepest background */
    --bg-panel: #1e293b;
    /* Panel background */
    --bg-input: #334155;
    /* Input background */

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Brand Accents */
    --accent: #f43f5e;
    /* Vibrant Rose/Red */
    --accent-hover: #e11d48;
    /* Darker Rose */
    --accent-glow: rgba(244, 63, 94, 0.5);

    /* Functional Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Card Rarity Gradients (refined) */
    --card-bronze-grad: linear-gradient(135deg, #dfbda0 0%, #7d5a42 100%);
    --card-silver-grad: linear-gradient(135deg, #f5f5f5 0%, #9ca3af 100%);
    --card-gold-grad: linear-gradient(135deg, #fcd34d 0%, #b45309 100%);

    /* Fonts */
    --font-heading: 'Oswald', sans-serif;
    --font-card: 'OutlastRegular', 'Oswald', sans-serif;
    --font-body: 'Roboto', 'Inter', system-ui, sans-serif;

    /* Effects */
    --glass-panel: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px var(--accent-glow);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Hide Scrollbar Utility */
.no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.hidden {
    display: none;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    display: flex;
    height: calc(100vh - 70px);
    /* Adjust for navbar */
    margin-top: 70px;
    background: radial-gradient(circle at top right, #1e1b4b, var(--bg-dark));
}

/* Global Navbar Styling */
.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo-img {
    height: 38px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-logo-img:hover {
    transform: scale(1.05);
}

.nav-brand-text {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.1rem;
    /* Matched to Feed requirement */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 10px;
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(30, 41, 59, 0.5);
    padding: 6px 15px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border-radius: 30px;
    border: 1px solid transparent;
    line-height: 1;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
    border-color: var(--accent);
}

.nav-btn-gallery {
    /* Specialized style for Gallery if not active */
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.nav-btn-gallery:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-1px);
}

.nav-btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.nav-btn-primary {
    background: var(--accent);
    color: white;
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}



/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px;
}





/* Responsive Navbar */
@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: block;
    }

    .main-navbar {
        justify-content: space-between !important;
        padding: 0 20px;
    }

    .nav-links {
        position: absolute;
        top: 75px;
        left: auto;
        right: 10px;
        width: auto;
        min-width: 220px;
        background: rgba(15, 23, 42, 0.98);
        background: rgba(15, 23, 42, 0.98);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 15px;
        gap: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        display: none;
        align-items: stretch;
        /* Full width items */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .nav-links.mobile-open {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    .nav-link {
        justify-content: center;
        width: 100%;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar Styling - Glassmorphism & Spacing */
.controls-panel {
    width: 380px;
    /* Slightly wider for better breathing room */
    background: var(--glass-panel);
    background: var(--glass-panel);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 24px;
    overflow-y: auto;
    border-right: var(--glass-border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    z-index: 20;
}

/* Modern Header */
.app-header {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.header-logo {
    width: 200px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.02);
}

.app-subtitle,
.preview-subtitle {
    font-family: var(--font-heading);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 20px;
}

/* Form Sections */
.form-section {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Fainter divider */
    padding-bottom: 20px;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

/* Modern Inputs & Labels */
.input-group,
.range-group {
    margin-bottom: 20px;
}

.municipality-group {
    display: none;
}

.municipality-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.label-with-help {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-with-help label {
    margin-bottom: 0;
}

.label-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.help-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-trigger:hover {
    color: var(--accent);
    background: rgba(244, 63, 94, 0.1);
    transform: scale(1.1);
}

.lock-btn {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.lock-btn:hover {
    transform: scale(1.1);
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background-color: #475569;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.15);
}

input::placeholder {
    color: var(--text-muted);
}

/* Custom Range Input Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: #475569;
    border-radius: 3px;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--text-primary);
    border: 2px solid var(--accent);
    margin-top: -7px;
    /* vertical center */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.3);
}

/* Locked State Styles */
input[type="range"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.range-group.is-locked label {
    color: var(--text-muted);
}

.range-group.is-locked .attr-comment {
    opacity: 0.6;
    pointer-events: none;
}

.lock-btn.locked {
    filter: drop-shadow(0 0 5px var(--accent-glow));
    transform: scale(1.1);
}

/* Ads Panel Layout */
.ads-panel {
    width: 300px;
    background: var(--glass-panel);
    /* Consistent background */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-left: var(--glass-border);
    padding: 24px;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 10;
}

.ad-placeholder {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: all 0.3s;
}

.ad-placeholder:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Premium Buttons */
.action-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.3), 0 2px 4px -1px rgba(244, 63, 94, 0.15);
}

.action-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(244, 63, 94, 0.4), 0 4px 6px -2px rgba(244, 63, 94, 0.2);
}

.action-btn:hover::after {
    opacity: 1;
}

.action-btn:active {
    transform: translateY(0);
}

.action-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    font-style: normal;
    opacity: 0.8;
}

/* Preview Area */
.preview-area {
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: transparent;
    padding: 20px 40px;
    overflow-y: auto;
    z-index: 1;
}

.preview-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../img/background/palacioPlanalto.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.2;
    z-index: -1;
    mix-blend-mode: overlay;
    filter: saturate(0) contrast(1.2);
}

/* Dynamic Preview Atmospheres (Glows behind the card) */
.preview-bronze,
.preview-bronze-especial {
    box-shadow: inset 0 0 100px rgba(125, 90, 66, 0.3);
}

.preview-silver,
.preview-silver-especial {
    box-shadow: inset 0 0 100px rgba(156, 163, 175, 0.3);
}

.preview-gold,
.preview-gold-especial {
    box-shadow: inset 0 0 100px rgba(234, 179, 8, 0.3);
}

.preview-candidate {
    box-shadow: inset 0 0 100px rgba(255, 255, 255, 0.05);
}


/* Watermark Button */
.watermark-action-wrapper {
    position: relative;
    z-index: 10;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.watermark-btn {
    padding: 10px 20px;
    background: rgba(30, 41, 59, 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.watermark-btn:hover {
    background: var(--bg-panel);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}


/* CARD CONTAINER & PERSPECTIVE */
.card-container {
    position: relative;
    z-index: 10;
    margin-bottom: 40px;
    perspective: 1500px;
    /* Better perspective depth */
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Card Base Structure */
.card {
    width: 340px;
    /* Slightly wider */
    height: 520px;
    /* Proportional height */
    position: relative;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-size: cover;
    /* changed from contain to cover for better fit */
    background-repeat: no-repeat;
    background-position: center;
    color: #1f2937;
    /* Dark text for inside card */
    display: flex;
    flex-direction: column;
    font-family: var(--font-card);
    overflow: hidden;
    /* Ensure content stays inside rounded corners if we had them (FIFA cards usually don't have standard radius but we keep structure) */
    border-radius: 4px;
    /* Slight softening of corners */
}

.card:hover {
    transform: translateY(-10px) rotateX(2deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

/* Card Themes */
.card-bronze {
    background-image: url('../../img/PlanoFundoCartaBronze.PNG');
    border: none;
}

.card-bronze-especial {
    background-image: url('../../img/PlanoFundoCartaBronzeEspecial.png');
    border: none;
}

.card-silver {
    background-image: url('../../img/PlanoFundoCartaPrata.PNG');
    border: none;
}

.card-silver-especial {
    background-image: url('../../img/PlanoFundoCartaPrataEspecial.PNG');
    border: none;
}

.card-gold {
    background-image: url('../../img/PlanoFundoCartaOuro.PNG');
    border: none;
}

.card-gold-especial {
    background-image: url('../../img/PlanoFundoCartaOuroEspecial.pnd.png');
    border: none;
}

.card-candidate {
    background-image: url('../../img/PlanoFundoCandidato.png');
    border: none;
}

/* Card Internal Typography & Layout */
/* NOTE: These classes overlap the background image elements. 
   Adjustments made to ensure alignment with the FIFA-style background image.
*/

.card-top {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    padding: 45px 35px 0 35px;
    /* Tuned padding */
    height: 140px;
}

.card-score-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    margin-top: 40px;
    margin-left: -4px;
}

.overall-score {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
}

.position-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4px;
}

.position-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
}

.mandate-label {
    font-size: 0.65rem;
    /* Smaller mandate text */
    opacity: 0.8;
    margin-top: 2px;
}

.card-flag-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 50px;
    padding-top: 5px;
    margin-top: 20px;
    position: relative;
    left: 10px;
}

.municipality-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.1;
    margin-top: 5px;
    max-width: 80px;
    text-align: center;
}

.state-flag,
.party-logo {
    width: 38px;
    height: auto;
    /* Maintain Aspect Ratio */
    max-height: 38px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.card-photo-container {
    position: relative;
    z-index: 4;
    height: 250px;
    /* Taller photo area */
    width: 190px;
    width: 190px;
    margin: -90px auto 0;
    left: 4px;
    /* Huge negative margin to pull photo up, adjusted up 10px */
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align bottom */
}

.card-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Smooth fade at bottom to blend with stats area */
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.photo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    background-image: url('../../img/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    /* pointer-events removed to intercept clicks/long-presses for protection */
    z-index: 6;
    -webkit-user-select: none;
    user-select: none;
    transition: opacity 0.5s ease;
}

.photo-watermark.hidden {
    opacity: 0 !important;
}

.card-name {
    position: relative;
    z-index: 5;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: none;
    margin-top: -35px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
}

/* Card Stats Grid */
.card-stats {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    /* Increased horizontal gap */
    padding: 0 25px 0 40px;
    /* Adjusted padding */
    margin-top: 10px;
}

.stat-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 1rem;
}

.stat-value {
    font-weight: 800;
    font-size: 1.25rem;
    margin-right: 6px;
    width: 32px;
    text-align: right;
    transition: text-shadow 0.3s ease;
}

.high-score {
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0px 0px 8px rgba(255, 255, 255, 0.9);
}

.stat-label {
    font-weight: 500;
    font-size: 0.8rem;
    opacity: 1;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.card-bottom-bar {
    margin-top: auto;
    height: 15px;
    background: transparent;
}

/* Help Trigger Styling */
.label-with-help {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-with-help label {
    margin-bottom: 0;
    flex-grow: 1;
}

.help-trigger {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent);
    border: 1px solid var(--accent);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-left: 10px;
    font-weight: 700;
}

.help-trigger:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Modal Overlay & Card - Glassmorphism */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    /* Deep dark overlay */
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 550px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: rgba(15, 23, 42, 0.5);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-modal:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
    color: var(--text-secondary);
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.faq-item {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-icon {
    font-size: 1.5rem;
    background: rgba(244, 63, 94, 0.1);
    min-width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    color: var(--accent);
}

.faq-info h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.faq-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.faq-info strong {
    color: #e94560;
}

/* Auth Modal Specifics */
.auth-card {
    max-width: 500px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.radio-group-horizontal {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Auth Form Elements */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.radio-group-horizontal {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(244, 63, 94, 0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(244, 63, 94, 0.1);
}

.checkbox-group a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.captcha-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.captcha-container label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.captcha-label {
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
}

.submit-auth-btn {
    background: var(--accent);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
    margin-top: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3);
}

.submit-auth-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(244, 63, 94, 0.4);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.auth-switch a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.view-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Post Actions */
.post-actions-container {
    margin-top: 30px;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.post-btn {
    background: linear-gradient(135deg, #059669, #10b981);
    /* Emerald Gradient */
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.post-btn:hover {
    background: linear-gradient(135deg, #047857, #059669);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.gallery-link-container {
    text-align: center;
    margin-top: 10px;
}

.gallery-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.gallery-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}


/* Responsive Design */
@media (max-width: 900px) {
    body {
        overflow: auto;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .controls-panel {
        width: 100%;
        height: auto;
        order: 2;
        /* Controls below preview on mobile */
        border-right: none;
        border-top: 1px solid var(--glass-border);
        padding-bottom: 80px;
        /* Space for mobile nav/scrolling */
        box-shadow: none;
    }

    .preview-area {
        order: -1;
        width: 100%;
        height: auto;
        min-height: 100vh;
        /* Minimum full height */
        overflow: visible;
        padding: 40px 20px;
        justify-content: center;
        background: transparent;
    }

    .card-container {
        transform: scale(0.85);
        /* Slightly smaller on mobile */
        margin: 0;
    }

    .header-logo {
        width: 140px;
    }

    .modal-card {
        width: 95%;
        margin: 10px;
    }

    .ads-panel {
        display: none;
        /* Hide ads on mobile to save space */
    }

    /* Scroll Indicator for Mobile */
    .scroll-down-indicator {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-top: 20px;
        color: var(--text-secondary);
        font-family: var(--font-heading);
        font-size: 0.9rem;
        letter-spacing: 1px;
        animation: bounce 2s infinite;
        opacity: 0.8;
    }

    .scroll-arrow {
        font-size: 1.5rem;
    }

    @keyframes bounce {

        0%,
        20%,
        50%,
        80%,
        100% {
            transform: translateY(0);
        }

        40% {
            transform: translateY(-10px);
        }

        60% {
            transform: translateY(-5px);
        }
    }
}

/* Hide indicator on desktop */
.scroll-down-indicator {
    display: none;
}

/* Music Controls */
.music-controls {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 100;
    display: flex;
    gap: 12px;
}

.music-btn {
    background: rgba(30, 41, 59, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.music-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}


/* Utility & Helpers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mb-8 {
    margin-bottom: 8px;
}

.mr-10 {
    margin-right: 15px;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.toggle-label input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.photo-input-container {
    margin-top: 10px;
}

/* Extras */
.lock-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    border-radius: 8px;
    height: 32px;
    width: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.lock-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.lock-btn.locked {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 10px var(--accent-glow);
}

.attr-comment {
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    background-color: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s;
}

.attr-comment:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.1);
}

/* Specific Action Buttons (replacing inline styles) */
.photo-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#openRemoveBgBtn {
    background: #334155;
    /* Slate 700 */
    flex: 1;
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 10px;
    margin-top: 0;
}

#openRemoveBgBtn:hover {
    background: #475569;
}

#smartCropBtn {
    background: #6366f1;
    /* Indigo 500 */
    flex: 1;
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 10px;
    margin-top: 0;
}

#smartCropBtn:hover {
    background: #4f46e5;
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

#cancelPostBtn {
    background: #ef4444;
    /* Red 500 */
    margin-top: 0;
    width: auto;
}

#cancelPostBtn:hover {
    background: #dc2626;
}

#confirmPostBtn {
    margin-top: 0;
    width: auto;
}

/* =========================================
   FEED PAGE STYLES (Moved from feed.html)
   ========================================= */

.feed-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px 0;
    /* Add top padding for fixed navbar */
}

.loading-text {
    color: var(--text-secondary);
    text-align: center;
    width: 100%;
    font-size: 1.2rem;
    margin-top: 50px;
}

.feed-header {
    text-align: center;
    background: transparent;
    padding: 0 0 10px 0;
    margin-bottom: 0;
    position: relative;
}

.feed-header h1 {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
    /* Remove margin in horizontal layout */
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-home:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    /* Adjusted min-width */
    gap: 40px;
    padding: 0;
}

.post-card-container {
    background: var(--glass-panel);
    border-radius: 20px;
    overflow: visible;
    /* Allow card pop-out */
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}

.post-card-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    z-index: 10;
}

/* Wrapper to scale down the card for display in grid */
.card-wrapper {
    transform: scale(0.65);
    /* Smaller scale for grid */
    transform-origin: center top;
    height: 340px;
    /* Fixed height container for the scaled card (520 * 0.65 approx) */
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
    pointer-events: none;
    /* Prevent interaction with mini card */
}

.post-info {
    width: 100%;
    padding: 10px 20px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.post-author {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-justifications {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 12px;
    max-height: 120px;
    overflow-y: auto;
}

/* Custom Scrollbar for mini justifications */
.post-justifications::-webkit-scrollbar {
    width: 4px;
}

.post-justifications::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.justification-item {
    font-size: 0.8rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.justification-item:last-child {
    margin-bottom: 0;
}

.justification-item strong {
    color: var(--accent);
    display: inline-block;
    margin-right: 5px;
    font-weight: 600;
}

.delete-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    /* Red */
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    width: calc(100% - 40px);
    margin: 10px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-weight: 600;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* Responsive */
.posts-carousel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s;
    position: absolute;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0.7;
}

.scroll-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 1;
}

.scroll-btn.left {
    left: 0;
}

.scroll-btn.right {
    right: 0;
}

.posts-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 30px;
    padding: 20px 60px;
    /* Space for buttons */
    width: 100%;
    scroll-snap-type: x mandatory;
}

/* Chrome/Safari */

.post-card-container {
    /* ... existing styles ... */
    flex: 0 0 320px;
    /* Fallback width */
    scroll-snap-align: center;
    margin: 0;
}

/* Desktop specific for 3 items */
@media (min-width: 1201px) {
    .post-card-container {
        flex: 0 0 calc(33.333% - 20px);
        max-width: 440px;
    }
}

/* Responsive - Switch to vertical grid if < 3 items fit (approx 1200px) */
@media (max-width: 1200px) {
    .scroll-btn {
        display: none !important;
    }

    .posts-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 30px;
        padding: 0 20px;
        overflow-x: visible;
        scroll-snap-type: none;
        justify-items: center;
        width: 100%;
    }

    .post-card-container {
        flex: unset;
        width: 100%;
        max-width: 440px;
    }
}

@media (max-width: 768px) {
    .feed-header h1 {
        font-size: 1.5rem;
    }

    .card-wrapper {
        transform: scale(0.75);
        height: 400px;
    }
}

/* Modal Styles */
.just-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.just-modal-card {
    background: var(--bg-panel);
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.just-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.just-close-btn:hover {
    color: var(--text-primary);
}

.just-title {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.just-title span {
    color: var(--accent);
}

.just-body {
    color: var(--text-secondary);
    max-height: 60vh;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Feed Specific Overrides */
.feed-container .card {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.feed-container .overall-score {
    color: #333 !important;
}

/* Main Footer - Navbar Style (Bottom Bar) */
.main-footer {
    background: rgba(15, 23, 42, 0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 40px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    /* Alinhado com layouts largos */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.02);
}

.footer-logo-img {
    height: 38px;
    /* Igual ao navbar */
    width: auto;
}

.footer-brand-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    /* Igual ao navbar */
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(30, 41, 59, 0.5);
    /* Pill style igual ao navbar */
    padding: 6px 15px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 30px;
}

.footer-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    flex-wrap: wrap;
    gap: 10px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.footer-social-disclaimer {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
}

@media (max-width: 992px) {
    .main-footer {
        padding: 30px 20px;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Institutional Pages - Refined Experience */
.inst-page-container {
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
}

.inst-content-wrapper {
    max-width: 800px;
    margin: 140px auto 80px;
    padding: 60px;
    background: rgba(30, 41, 59, 0.4);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.inst-header {
    margin-bottom: 60px;
    position: relative;
}

.inst-header h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.inst-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 20px auto 0;
    border-radius: 2px;
}

.inst-body {
    color: var(--text-secondary);
    line-height: 1.85;
}

.inst-body h2 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.6rem;
    margin: 50px 0 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.inst-body h2::before {
    content: '';
    width: 12px;
    height: 2px;
    background: var(--accent);
    display: block;
}

.inst-body p {
    margin-bottom: 25px;
    font-size: 1.05rem;
    text-align: left;
}

.highlight-section {
    background: rgba(244, 63, 94, 0.03);
    border: 1px solid rgba(244, 63, 94, 0.1);
    padding: 35px;
    border-radius: 20px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

.highlight-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}

.inst-body ul {
    list-style: none;
    padding-left: 0;
    margin: 30px 0;
}

.inst-body li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.inst-body li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

@media (max-width: 768px) {
    .inst-content-wrapper {
        margin: 100px 20px 40px;
        padding: 40px 25px;
    }

    .inst-header h1 {
        font-size: 2.5rem;
    }

    .footer-links {
        gap: 20px;
    }

    .support-email-link {
        font-size: 1.2rem !important;
    }
}

.support-email-link {
    font-size: 1.8rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
    word-break: break-all;
    /* Prevent overflow on very small devices */
}

.support-email-link:hover {
    color: var(--accent);
}

.contact-card {
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.contact-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: var(--accent);
}

.contact-hours {
    margin-top: 15px;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Authentication Enhancements */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider:not(:empty)::before {
    margin-right: 1em;
}

.auth-divider:not(:empty)::after {
    margin-left: 1em;
}

.google-btn-auth {
    display: flex;
    justify-content: center;
    margin-top: 5px;
}