/* ==========================================================================
   GOOD GAME #1 - FORMULARIO DE POSTULACIONES DE STAFF
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Montserrat:wght@400;500;600;700;800&family=Outfit:wght@300;400;600;700;800&family=Pirata+One&display=swap');

:root {
    /* Tema 1: Capitán Jack Sparrow (Carmesí, Caoba, Negro Obsidiana & Dorado Imperial Animado) */
    --bg-ocean: #070509;
    --bg-dark-wood: #18090d;
    --bg-card: rgba(18, 9, 14, 0.9);
    --bg-card-parchment: rgba(26, 11, 16, 0.94);
    
    --gold-primary: #FFD700;
    --gold-amber: #FF7700;
    --gold-burnished: #E5A91A;
    --gold-gradient: linear-gradient(135deg, #FFE57F 0%, #FFB300 40%, #FF2A4B 80%, #9A0007 100%);
    --gold-glow: 0 0 24px rgba(255, 42, 75, 0.35), 0 0 12px rgba(255, 215, 0, 0.4);

    --sea-cyan: #00F0FF;
    --sea-gradient: linear-gradient(135deg, #00F0FF 0%, #0083B0 100%);
    --sea-glow: 0 0 20px rgba(0, 240, 255, 0.35);

    --crimson-red: #FF2A4B;
    --crimson-gradient: linear-gradient(135deg, #FF4D6D 0%, #C70039 50%, #580015 100%);

    --text-gold: #FFE082;
    --text-primary: #F8F9FA;
    --text-secondary: #D4C5C9;
    --text-muted: #9A848B;

    --border-gold-filigree: rgba(255, 42, 75, 0.4);
    --border-glow: rgba(255, 215, 0, 0.35);

    --font-pirate: 'Pirata One', cursive;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gentleAmbientPulse {
    0% { opacity: 0.85; }
    50% { opacity: 1; }
    100% { opacity: 0.85; }
}

/* Tema 2: El Perla Negra (Black Pearl - Plata & Fuego de Luna) */
[data-theme="black-pearl"] {
    --bg-ocean: #060910;
    --bg-dark-wood: #0d111a;
    --bg-card: rgba(14, 20, 32, 0.92);
    --bg-card-parchment: rgba(18, 26, 40, 0.95);
    
    --gold-primary: #38EF7D;
    --gold-amber: #11998E;
    --gold-burnished: #20BF55;
    --gold-gradient: linear-gradient(135deg, #A8FF78 0%, #78FFD6 100%);
    --gold-glow: 0 0 22px rgba(56, 239, 125, 0.45);

    --sea-cyan: #E0E6ED;
    --sea-gradient: linear-gradient(135deg, #FFFFFF 0%, #8A9BA8 100%);
    --sea-glow: 0 0 20px rgba(224, 230, 237, 0.4);

    --border-gold-filigree: rgba(56, 239, 125, 0.35);
    --text-gold: #B8FFD3;
}

/* Tema 3: La Venganza del Reina Ana (Queen Anne's Revenge - Fuego Carmesí) */
[data-theme="queen-anne"] {
    --bg-ocean: #120406;
    --bg-dark-wood: #1f080b;
    --bg-card: rgba(28, 10, 14, 0.92);
    --bg-card-parchment: rgba(36, 12, 16, 0.95);

    --gold-primary: #FF3344;
    --gold-amber: #FF9E00;
    --gold-burnished: #D32F2F;
    --gold-gradient: linear-gradient(135deg, #FF758C 0%, #FF7EB3 50%, #FF3344 100%);
    --gold-glow: 0 0 24px rgba(255, 51, 68, 0.5);

    --sea-cyan: #FFD700;
    --sea-gradient: linear-gradient(135deg, #FFE57F 0%, #FFB300 100%);
    --sea-glow: 0 0 20px rgba(255, 215, 0, 0.4);

    --border-gold-filigree: rgba(255, 51, 68, 0.4);
    --text-gold: #FFB3BA;
}

/* Tema 4: El Holandés Errante (Flying Dutchman - Esmeralda Bioluminiscente) */
[data-theme="dutchman"] {
    --bg-ocean: #031417;
    --bg-dark-wood: #052228;
    --bg-card: rgba(8, 28, 32, 0.92);
    --bg-card-parchment: rgba(10, 36, 40, 0.95);

    --gold-primary: #00FF87;
    --gold-amber: #60EFFF;
    --gold-burnished: #00B894;
    --gold-gradient: linear-gradient(135deg, #60EFFF 0%, #00FF87 100%);
    --gold-glow: 0 0 24px rgba(0, 255, 135, 0.5);

    --sea-cyan: #00F0FF;
    --sea-gradient: linear-gradient(135deg, #00F0FF 0%, #0083B0 100%);
    --sea-glow: 0 0 20px rgba(0, 240, 255, 0.4);

    --border-gold-filigree: rgba(0, 255, 135, 0.4);
    --text-gold: #B3FFDA;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #060911;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(15, 10, 18, 0.95) 0%, rgba(6, 9, 17, 1) 100%);
    background-attachment: fixed;
    animation: gentleAmbientPulse 20s ease-in-out infinite alternate;
}

/* Canvas Particles */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* High Z-Index Gold Coins Overlay Canvas */
#coins-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

/* App Wrapper */
.app-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 40px 15px;
}

.form-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Top Sound & Controls Bar */
.top-bar-actions {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(13, 17, 26, 0.92);
    border: 1.5px solid var(--border-gold-filigree);
    border-radius: 50px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), var(--gold-glow);
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}


.community-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--gold-primary);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.community-pill i {
    color: var(--gold-amber);
    font-size: 13px;
    filter: drop-shadow(0 0 6px var(--gold-primary));
}

.top-bar-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

/* Theme Selector Dropdown */
.theme-selector-dropdown {
    background: rgba(10, 15, 25, 0.95);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 5px 24px 5px 10px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 175px;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23FFD700' viewBox='0 0 16 16'><path d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.theme-selector-dropdown:hover, .theme-selector-dropdown:focus {
    background-color: rgba(255, 215, 0, 0.15);
    box-shadow: var(--gold-glow);
}

.theme-selector-dropdown option {
    background: #0d121d;
    color: #ffd700;
}

/* Action Buttons Styling */
.audio-toggle-btn, .draft-clear-btn, .ocean-toggle-btn, .admin-login-btn {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 5px 11px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.audio-toggle-btn:hover, .draft-clear-btn:hover, .ocean-toggle-btn:hover, .admin-login-btn:hover {
    background: var(--gold-primary);
    color: #060a12;
    box-shadow: var(--gold-glow);
    transform: translateY(-1px);
}

.admin-login-btn {
    background: rgba(255, 215, 0, 0.18);
    font-weight: 700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

.draft-saved-notice {
    font-size: 11px;
    color: var(--sea-cyan);
    font-weight: 600;
    white-space: nowrap;
    display: none;
    align-items: center;
    gap: 5px;
}

/* Header Card - Pirate Galleon Theme */
.header-card {
    background: var(--bg-card);
    border: 2px solid var(--gold-burnished);
    border-radius: var(--radius-lg);
    padding: 35px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), var(--gold-glow);
    backdrop-filter: blur(16px);
}

.header-card::before {
    content: '🏴‍☠️';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 20px;
    opacity: 0.7;
}

.header-card::after {
    content: '⚓';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 20px;
    opacity: 0.7;
}

.brand-header-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    padding: 5px;
    background: var(--gold-gradient);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 15px rgba(0, 0, 0, 0.8);
    animation: pulseLogo 4s infinite alternate;
}

@keyframes pulseLogo {
    0% { transform: scale(1); box-shadow: 0 0 25px rgba(255, 215, 0, 0.4); }
    100% { transform: scale(1.04); box-shadow: 0 0 40px rgba(255, 215, 0, 0.7); }
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #060a12;
}

.header-title-box h1 {
    font-family: var(--font-pirate);
    font-size: 38px;
    letter-spacing: 2px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(255, 158, 0, 0.4);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.header-subtitle {
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
    font-size: 14.5px;
    font-weight: 400;
}

.badges-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.pirate-rank-badge, .strength-gauge-badge, .draft-saved-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 158, 0, 0.15);
    border: 1px dashed var(--gold-amber);
    padding: 8px 18px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--gold-primary);
    font-weight: 700;
}

.strength-gauge-badge, .draft-saved-badge {
    background: rgba(0, 240, 255, 0.12);
    border: 1px dashed var(--sea-cyan);
    color: var(--sea-cyan);
}

.draft-saved-badge {
    display: none;
    box-shadow: var(--sea-glow);
    animation: fadeIn 0.3s ease;
}

/* Stepper Card with Compass Wheel */
.stepper-card {
    background: var(--bg-card-parchment);
    border: 1px solid var(--border-gold-filigree);
    border-radius: var(--radius-lg);
    padding: 25px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.compass-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 5px;
}

.compass-wheel {
    width: 60px;
    height: 60px;
    position: relative;
    border-radius: 50%;
    border: 3px solid var(--gold-primary);
    background: radial-gradient(circle, #1a140d 0%, #080c12 100%);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.compass-needle {
    width: 4px;
    height: 44px;
    background: linear-gradient(to bottom, #FF5252 50%, #FFF 50%);
    border-radius: 2px;
    position: absolute;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 0 8px rgba(255, 82, 82, 0.8);
}

.compass-center {
    width: 10px;
    height: 10px;
    background: var(--gold-primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 6px var(--gold-primary);
}

.progress-bar-track {
    flex-grow: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 20%;
    background: var(--gold-gradient);
    box-shadow: 0 0 12px var(--gold-primary);
    transition: width 0.4s ease;
}

.stepper-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    opacity: 0.55;
    transition: var(--transition);
    text-align: center;
}

.step-item:hover { opacity: 0.85; }
.step-item.active { opacity: 1; }
.step-item.completed { opacity: 0.95; }

.step-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(15, 22, 34, 0.9);
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
}

.step-item.active .step-icon-box {
    border-color: var(--gold-primary);
    background: var(--gold-gradient);
    color: #000;
    box-shadow: 0 0 15px var(--gold-primary);
    transform: translateY(-2px);
}

.step-item.completed .step-icon-box {
    border-color: var(--sea-cyan);
    background: var(--sea-cyan);
    color: #000;
    box-shadow: 0 0 10px var(--sea-cyan);
}

.step-label {
    font-size: 11.5px;
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--text-secondary);
}

.step-item.active .step-label {
    color: var(--gold-primary);
    font-weight: 700;
}

/* Form Section Panels */
.form-section {
    display: none;
    flex-direction: column;
    gap: 22px;
    animation: fadeIn 0.4s ease forwards;
}

.form-section.active { display: flex; }

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

.section-banner {
    background: linear-gradient(135deg, rgba(20, 14, 10, 0.95) 0%, rgba(10, 18, 28, 0.95) 100%);
    border: 1px solid var(--border-gold-filigree);
    border-left: 5px solid var(--gold-primary);
    border-radius: var(--radius-md);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.section-banner-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-banner-title i {
    font-size: 24px;
    color: var(--gold-primary);
    filter: drop-shadow(0 0 8px var(--gold-primary));
}

.section-banner-title h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--text-gold);
}

.q-badge {
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid var(--gold-burnished);
    color: var(--gold-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
}

.challenge-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 158, 0, 0.15);
    border: 1px solid var(--gold-amber);
    color: var(--gold-primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11.5px;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-group {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
    position: relative;
}

.form-group:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.form-group.has-error {
    border-color: var(--crimson-red) !important;
    box-shadow: 0 0 15px rgba(255, 51, 68, 0.4) !important;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

label {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-family: var(--font-secondary);
}

.q-num { color: var(--gold-primary); font-family: var(--font-heading); margin-right: 6px; font-size: 18px; }
.req { color: var(--crimson-red); margin-left: 2px; }

.help-text {
    font-size: 15px;
    color: #E2E8F0;
    margin-bottom: 16px;
    line-height: 1.65;
    font-weight: 400;
}

.word-counter-badge {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    font-family: var(--font-secondary);
}

.word-counter-badge.good-detail {
    color: #2ED573;
    font-weight: 600;
}

/* Inputs & Textareas */
input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    background: rgba(6, 10, 18, 0.8);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14.5px;
    outline: none;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--gold-primary);
    background: rgba(12, 20, 34, 0.95);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

input.input-error {
    border-color: var(--crimson-red) !important;
    box-shadow: 0 0 15px rgba(255, 51, 68, 0.5) !important;
    animation: shake 0.4s ease;
}

textarea { resize: vertical; min-height: 100px; }

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFD700' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
    padding-right: 40px;
}

select option { background-color: #0b121e; color: #fff; padding: 10px; }

.input-with-icon { position: relative; }
.input-with-icon i {
    position: absolute; left: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--gold-primary); font-size: 16px;
}
.input-with-icon input { padding-left: 45px; }

/* Emblem Selection Grid */
.emblem-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.emblem-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(6, 10, 18, 0.7);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 6px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.emblem-card i { font-size: 20px; color: var(--text-muted); }
.emblem-card span { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.emblem-card input { display: none; }
.emblem-card:has(input:checked) { border-color: var(--gold-primary); background: rgba(255, 215, 0, 0.15); }
.emblem-card input:checked + div i { color: var(--gold-primary); }

/* Radio & Checkboxes */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.custom-radio, .custom-checkbox { display: block; cursor: pointer; user-select: none; }
.custom-radio input, .custom-checkbox input { position: absolute; opacity: 0; }

.radio-box, .check-box {
    display: flex; 
    align-items: center; 
    gap: 12px;
    background: rgba(6, 10, 18, 0.8);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: var(--radius-sm);
    padding: 14px 18px; 
    font-size: 15px;
    color: #E2E8F0;
    font-weight: 500;
    transition: var(--transition);
    min-height: 52px;
}

.custom-radio:hover .radio-box,
.custom-checkbox:hover .check-box {
    border-color: rgba(255, 215, 0, 0.45);
    background: rgba(14, 22, 36, 0.9);
    transform: translateY(-2px);
}

.custom-radio input:checked ~ .radio-box,
.custom-checkbox input:checked ~ .check-box {
    border-color: var(--gold-primary);
    background: rgba(255, 215, 0, 0.15);
    color: #FFF;
    font-weight: 700;
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
}

.scale-rating {
    display: flex; flex-direction: column; gap: 10px;
    background: rgba(6, 10, 18, 0.5); padding: 15px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.scale-buttons { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.scale-buttons label input { display: none; }
.scale-buttons label span {
    display: flex; align-items: center; justify-content: center;
    height: 38px; background: rgba(15, 22, 34, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 6px; color: var(--text-secondary); font-weight: 700;
    transition: var(--transition);
}

.scale-buttons label input:checked + span {
    background: var(--gold-gradient); color: #000;
    border-color: var(--gold-primary); box-shadow: 0 0 10px var(--gold-primary);
}

.scale-labels-flex { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }

.error-msg { display: none; color: var(--crimson-red); font-size: 12.5px; margin-top: 8px; font-weight: 600; }
.form-group.has-error .error-msg { display: block; }

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-info { background: rgba(0, 240, 255, 0.12); color: var(--sea-cyan); border: 1px solid var(--sea-cyan); }
.btn-primary { background: var(--sea-gradient); color: #000; box-shadow: var(--sea-glow); }
.btn-gold { background: var(--gold-gradient); color: #000; box-shadow: var(--gold-glow); }
.btn-danger { background: var(--crimson-gradient); color: #fff; }

.app-footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 215, 0, 0.15);
    color: var(--text-muted);
    font-size: 13px;
    font-family: var(--font-heading);
}

.app-footer strong { color: var(--gold-primary); }

/* Animated Pirate Treasure Chest */
.treasure-chest-box {
    width: 100px;
    height: 90px;
    margin: 0 auto 15px;
    position: relative;
}

.chest-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
    animation: chestBounce 1s ease infinite alternate;
}

@keyframes chestBounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.03); }
}

/* Modals & Custom Pirate Alert Banners */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(4, 7, 12, 0.92); backdrop-filter: blur(14px);
    z-index: 99999; display: none; align-items: center; justify-content: center; padding: 20px;
}

.modal-overlay.active { display: flex; animation: fadeIn 0.3s ease; }

.modal-card {
    background: var(--bg-card-parchment);
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    padding: 35px 25px;
    max-width: 540px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.5);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transition: var(--transition);
}

.modal-card.shake-modal {
    animation: modalShake 0.45s ease;
    border-color: var(--crimson-red);
    box-shadow: 0 0 50px rgba(255, 51, 68, 0.6);
}

@keyframes modalShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.modal-card-preview { max-width: 750px; text-align: left; }

.modal-icon {
    width: 75px; height: 75px; margin: 0 auto 15px; border-radius: 50%;
    background: var(--gold-gradient); display: flex; align-items: center; justify-content: center;
    font-size: 34px; color: #000; box-shadow: 0 0 25px var(--gold-primary);
}

.modal-icon.icon-error {
    background: var(--crimson-gradient);
    color: #fff;
    box-shadow: 0 0 25px rgba(255, 51, 68, 0.7);
}

.modal-card h2 { font-family: var(--font-pirate); font-size: 32px; color: var(--gold-primary); margin-bottom: 12px; }

/* Custom Pirate Error Banner inside Modal */
.pirate-error-banner {
    background: rgba(255, 51, 68, 0.15);
    border: 1px solid var(--crimson-red);
    border-radius: var(--radius-sm);
    color: #FF6B7A;
    padding: 12px 16px;
    font-size: 13.5px;
    margin-bottom: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 51, 68, 0.2);
}

.pirate-error-banner.active {
    display: flex;
}

.pirate-error-banner i {
    font-size: 20px;
    color: var(--crimson-red);
    filter: drop-shadow(0 0 6px var(--crimson-red));
}

/* Floating Toast Notification Container */
#pirateToastContainer {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.pirate-toast {
    background: rgba(15, 22, 34, 0.95);
    border: 1px solid var(--gold-primary);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    animation: slideInToast 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-width: 380px;
}

.pirate-toast.toast-error {
    border-color: var(--crimson-red);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 51, 68, 0.5);
}

.pirate-toast.toast-error i {
    color: var(--crimson-red);
    font-size: 22px;
}

.pirate-toast.toast-success i {
    color: #2ED573;
    font-size: 22px;
}

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

.preview-summary-list {
    display: flex; flex-direction: column; gap: 12px; margin: 20px 0; max-height: 380px; overflow-y: auto; padding-right: 8px;
}

.preview-summary-item {
    background: rgba(6, 10, 18, 0.7); border: 1px solid rgba(255, 215, 0, 0.2); padding: 12px 15px; border-radius: var(--radius-sm);
}

.preview-summary-item strong { color: var(--gold-primary); display: block; font-size: 13px; margin-bottom: 4px; }
.preview-summary-item span { color: var(--text-primary); font-size: 13.5px; white-space: pre-wrap; }

/* Admin Panel */
#adminPanelContainer { display: none; flex-direction: column; gap: 25px; width: 100%; animation: fadeIn 0.4s ease forwards; }
.admin-header-card { background: var(--bg-card); border: 2px solid var(--gold-burnished); border-radius: var(--radius-lg); padding: 30px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.admin-title-group h1 { font-family: var(--font-pirate); font-size: 32px; color: var(--gold-primary); }
.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.stat-card { background: rgba(10, 16, 26, 0.85); border: 1px solid rgba(255, 215, 0, 0.2); border-radius: var(--radius-md); padding: 18px; text-align: center; }
.stat-number { font-family: var(--font-pirate); font-size: 34px; color: var(--gold-primary); }
.stat-label { font-size: 12px; color: var(--text-muted); font-family: var(--font-secondary); text-transform: uppercase; }
.admin-controls-bar { display: flex; justify-content: space-between; align-items: center; gap: 15px; background: var(--bg-card); padding: 15px 20px; border-radius: var(--radius-md); border: 1px solid var(--border-gold-filigree); flex-wrap: wrap; }
.search-filter-box { display: flex; gap: 10px; flex-grow: 1; max-width: 600px; }
.admin-table-wrapper { background: var(--bg-card-parchment); border: 1px solid var(--border-gold-filigree); border-radius: var(--radius-lg); padding: 20px; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th, .admin-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid rgba(255, 215, 0, 0.12); }
.admin-table th { font-family: var(--font-heading); color: var(--gold-primary); font-size: 12.5px; text-transform: uppercase; }
.admin-table tbody tr:hover { background: rgba(255, 215, 0, 0.05); }
.status-badge { padding: 4px 10px; border-radius: 12px; font-size: 11.5px; font-weight: 700; display: inline-block; }
.status-pending { background: rgba(255, 158, 0, 0.2); color: var(--gold-amber); border: 1px solid var(--gold-amber); }
.status-approved { background: rgba(46, 213, 115, 0.2); color: #2ED573; border: 1px solid #2ED573; }
.status-rejected { background: rgba(211, 47, 47, 0.2); color: #FF4757; border: 1px solid #FF4757; }

/* Custom Pirate Gold Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(6, 10, 18, 0.9);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-primary) 0%, var(--gold-amber) 100%);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: #ffffff;
}

@media (max-width: 768px) {
    .top-bar-actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border-radius: 20px;
    }

    .community-pill {
        width: 100%;
        justify-content: center;
        font-size: 11px;
        padding: 6px 12px;
    }

    .top-bar-btns {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        width: 100%;
    }

    .theme-selector-dropdown {
        grid-column: span 3;
        max-width: 100%;
        width: 100%;
        font-size: 11.5px;
        padding: 6px 24px 6px 10px;
        text-align: center;
    }

    .audio-toggle-btn, .draft-clear-btn, .ocean-toggle-btn {
        width: 100%;
        justify-content: center;
        font-size: 10.5px;
        padding: 6px 4px;
        letter-spacing: -0.2px;
    }

    .admin-login-btn {
        grid-column: span 3;
        width: 100%;
        justify-content: center;
        font-size: 12px;
        padding: 8px 12px;
    }

    .header-title-box h1 { font-size: 26px; }
    .step-label { display: none; }
    .options-grid { grid-template-columns: 1fr; }
    .scale-buttons { grid-template-columns: repeat(5, 1fr); }
    .emblem-grid { grid-template-columns: repeat(3, 1fr); }
    .form-actions { flex-direction: column; }
    .btn { width: 100%; }
    .search-filter-box { flex-direction: column; width: 100%; }
    #pirateToastContainer { top: 10px; right: 10px; left: 10px; }
    .pirate-toast { max-width: 100%; }
}

/* --------------------------------------------------
   CONTROLES DE INTERFAZ Y TECLADO
   -------------------------------------------------- */
.btn-copy-tag {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid var(--sea-cyan);
    color: var(--sea-cyan);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    transition: var(--transition);
}

.btn-copy-tag:hover {
    background: var(--sea-cyan);
    color: #000;
    box-shadow: var(--sea-glow);
    transform: scale(1.15);
}

.keyboard-shortcuts-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-secondary);
    margin-top: 6px;
}

.keyboard-shortcuts-pill kbd {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--gold-burnished);
    border-radius: 3px;
    padding: 1px 5px;
    color: var(--gold-primary);
    font-size: 10px;
    font-weight: 700;
}

/* --------------------------------------------------
   THEME SELECTOR DROPDOWN - Developer: Davicit0
   -------------------------------------------------- */
.theme-selector-dropdown {
    background: rgba(10, 16, 26, 0.85);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.theme-selector-dropdown:hover {
    box-shadow: var(--gold-glow);
    background: rgba(255, 215, 0, 0.15);
}

/* --------------------------------------------------
   DASHBOARD CHARTS GRID - Developer: Davicit0
   -------------------------------------------------- */
.dashboard-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold-filigree);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chart-card-title {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.chart-svg-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.chart-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* --------------------------------------------------
   STAR RATING & ADMIN NOTES - Developer: Davicit0
   -------------------------------------------------- */
.star-rating-box {
    display: inline-flex;
    gap: 3px;
    font-size: 14px;
    color: rgba(255, 215, 0, 0.3);
    cursor: pointer;
}

.star-rating-box i.active {
    color: var(--gold-primary);
    filter: drop-shadow(0 0 4px var(--gold-primary));
}

.admin-notes-card {
    background: rgba(10, 16, 26, 0.85);
    border: 1px dashed var(--border-gold-filigree);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 15px;
}

.admin-notes-card h4 {
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--gold-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-notes-textarea {
    width: 100%;
    min-height: 70px;
    font-size: 13px;
    background: rgba(6, 10, 18, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    resize: vertical;
    margin-bottom: 8px;
}

/* AUDIT LOG TERMINAL CONSOLE */
.audit-log-terminal {
    background: #090c14;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    font-family: 'Fira Code', monospace;
}

.terminal-header {
    background: #111827;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.terminal-header .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.terminal-header .dot.red { background: #ff5f56; }
.terminal-header .dot.yellow { background: #ffbd2e; }
.terminal-header .dot.green { background: #27c93f; }

.terminal-title {
    font-size: 11.5px;
    color: #94a3b8;
    margin-left: 10px;
    letter-spacing: 1px;
}

.terminal-body {
    padding: 18px;
    min-height: 320px;
    max-height: 520px;
    overflow-y: auto;
    font-size: 12.5px;
    color: #e2e8f0;
    line-height: 1.7;
}

.log-entry {
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
    padding-bottom: 6px;
}

.log-time {
    color: #64748b;
    font-size: 11px;
    white-space: nowrap;
}

.log-actor {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}

.log-actor.owner {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.log-actor.admin {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.log-actor.system {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.log-msg {
    color: #cbd5e1;
}

.active-tab {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

@media (max-width: 650px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* High-End Gaming & Naval Audit Dossier Styling */
.modal-card-dossier {
    max-width: 960px;
    width: 100%;
    text-align: left;
    padding: 35px 30px;
    background: linear-gradient(145deg, #070b12 0%, #0d1422 100%);
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 70px rgba(255, 215, 0, 0.4);
    border-radius: 16px;
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--gold-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    z-index: 10;
}

.modal-close-btn:hover {
    background: var(--gold-primary);
    color: #000;
    transform: scale(1.1);
}

.dossier-header-card {
    background: rgba(12, 18, 28, 0.9);
    border: 1px solid var(--border-gold-filigree);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.dossier-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.dossier-id-badge {
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid var(--gold-burnished);
    color: var(--gold-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.dossier-candidate-name {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--gold-primary);
    margin: 4px 0 6px 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.dossier-sub-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13.5px;
    color: #cbd5e1;
    align-items: center;
}

.dossier-role-strip {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: rgba(6, 10, 18, 0.8);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13.5px;
    color: #e2e8f0;
    border: 1px solid rgba(255, 215, 0, 0.15);
    margin-bottom: 14px;
}

.dossier-rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dossier-phases-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 25px;
}

.dossier-phase-group {
    background: rgba(10, 15, 24, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 12px;
    padding: 18px;
}

.dossier-phase-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--gold-primary);
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.dossier-phase-title i {
    font-size: 16px;
    color: var(--sea-cyan);
}

.dossier-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 700px) {
    .dossier-grid-2 {
        grid-template-columns: 1fr;
    }
}

.dossier-card {
    background: rgba(14, 21, 33, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-left: 4px solid var(--gold-primary);
    border-radius: 8px;
    padding: 15px 18px;
    transition: var(--transition);
}

.dossier-card:hover {
    border-color: rgba(255, 215, 0, 0.45);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.dossier-q-title {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--gold-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dossier-q-title i {
    color: var(--sea-cyan);
}

.dossier-q-content {
    font-size: 14px;
    color: #f1f5f9;
    line-height: 1.6;
    word-break: break-word;
}

.dossier-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
}

.dossier-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(8, 12, 20, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 10px;
}



