/*
  REDESIGN V2 - HAPOEL BE'ER SHEVA SQUAD BUILDER
  Date: 28-JUL-2025
  Theme: Light (White & Red)
*/

/* 1. ROOT VARIABLES & GLOBAL STYLES */
/* ----------------------------------- */
:root {
    /* Color Palette - Light Theme */
    --hapoel-red: #D50000;
    --hapoel-red-dark: #B70000;
    --background-light: #FFFFFF; /* Main background */
    --background-dark: #F5F5F5;   /* Secondary background */
    --text-primary: #212121;      /* Main text color */
    --text-secondary: #757575;    /* Secondary text color */
    --border-color: #E0E0E0;
    --white: #FFFFFF;
    --black: #000000;
    --success-green: #00C853;
    --error-red: #D50000;

    /* Pitch Colors */
    --pitch-green-dark: #225C3C;
    --pitch-green-light: #2A724A;
    --pitch-line: rgba(255, 255, 255, 0.4);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.16);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.19);

    /* Fonts */
    --font-primary: 'Heebo', sans-serif;
    --font-dyslexic: 'Open Dyslexic', sans-serif;
    
    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-smooth: all 0.3s ease-in-out;
}

/* Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-dark);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    font-feature-settings: 'liga' 1, 'calt' 1;
}

/* Typography Scale */
h1, h2, h3 {
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
p { font-size: 1rem; margin-bottom: 1rem; }

a {
    color: var(--hapoel-red);
    text-decoration: none;
    transition: var(--transition-fast);
}
a:hover { color: var(--hapoel-red-dark); }


/* 2. HEADER & NAVIGATION */
/* ---------------------- */
header {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://scontent.ftlv5-1.fna.fbcdn.net/v/t39.30808-6/525058454_1332898128845504_5888793807677733149_n.jpg?_nc_cat=108&ccb=1-7&_nc_sid=127cfc&_nc_ohc=l6FNlaMOlwwQ7kNvwHDOGOs&_nc_oc=AdlKB_jxMTtzP6WCDFKaRmuCx8dY5l043bLhQxbMjiduzTzUPJ6tcMS8dZOLFJEcduQ7wOpyvEvmGXqW-_1wk-aj&_nc_zt=23&_nc_ht=scontent.ftlv5-1.fna&_nc_gid=Ii78xPNVL2YlhIIZ8RULxw&oh=00_AfRHyBFoh3Ae2uhxKqZNaGyaxqB0Bs6IYV40QDx5jvVxHg&oe=688D7C92') center center/cover no-repeat;
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 4px solid var(--hapoel-red);
}

header .header-content {
    max-width: 800px;
    margin: 0 auto;
}

header h1 {
    text-shadow: 0 2px 5px rgba(0,0,0,0.7);
    color: var(--white);
}

header p {
    font-size: 1.2rem;
    color: #E0E0E0;
    max-width: 600px;
    margin: 10px auto 0;
}

/* --- Hamburger Menu (Upgraded) --- */
.hamburger-menu {
    position: absolute;
    top: 30px;
    right: 20px;
    width: 30px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-menu .line {
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    position: absolute;
    left: 0;
}

.hamburger-menu .line:nth-child(1) {
    top: 0;
}
.hamburger-menu .line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}
.hamburger-menu .line:nth-child(3) {
    bottom: 0;
}

body.menu-open .hamburger-menu .line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
body.menu-open .hamburger-menu .line:nth-child(2) {
    opacity: 0;
}
body.menu-open .hamburger-menu .line:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}
/* --- End of Hamburger Menu --- */


.hamburger-menu:focus {
    outline: 2px solid var(--white);
    outline-offset: 4px;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: #f8f9fa;
    padding: 80px 20px 20px;
    box-shadow: var(--shadow-lg);
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    border-right: 1px solid var(--border-color);
}

.side-menu.open {
    right: 0;
}

.side-menu ul { list-style: none; }
.side-menu ul li { margin-bottom: 15px; }
.side-menu ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    padding: 12px 20px;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.side-menu ul li a:hover,
.side-menu ul li a:focus,
.side-menu ul li a.active {
    background-color: var(--hapoel-red);
    color: var(--white);
    outline: none;
}

.close-menu-button {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-fast);
}
.close-menu-button:hover { transform: rotate(90deg); color: var(--hapoel-red); }

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}
.overlay.open {
    opacity: 1;
    visibility: visible;
}


/* 3. MAIN CONTENT & LAYOUT */
/* -------------------------- */
main {
    padding: 50px 20px;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    justify-content: center;
    align-items: flex-start;
}

/* Shared Section Styles */
.pitch-section, .players-selection-section {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.pitch-section h2, .players-selection-section h2 {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    color: var(--text-primary);
}

.pitch-section h2::after, .players-selection-section h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--hapoel-red);
    border-radius: 2px;
}


/* 4. PITCH & PLAYER ELEMENTS */
/* -------------------------- */
.pitch-section {
    flex: 2;
    min-width: 450px;
    max-width: 700px;
}

.formation-selection {
    display: none; /* Hidden on desktop */
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    background-color: var(--background-dark);
    padding: 10px;
    border-radius: 8px;
}

.formation-selection span {
    align-self: center;
    margin-right: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.formation-button {
    background-color: #e0e0e0;
    color: var(--text-primary);
    border: 1px solid #bdbdbd;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 700;
}

.formation-button:hover {
    background-color: #d5d5d5;
}

.formation-button.active {
    background-color: var(--hapoel-red);
    color: var(--white);
    border-color: var(--hapoel-red-dark);
    box-shadow: 0 0 10px rgba(213, 0, 0, 0.4);
}

#football-pitch-wrapper {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
}

#football-pitch {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    background: linear-gradient(to bottom, var(--pitch-green-light), var(--pitch-green-dark));
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
    overflow: hidden;
}

#arena-text {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.15);
    font-size: 1.8vw;
    font-weight: 900;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 1;
}

/* Pitch Lines */
#football-pitch::before,
.penalty-area-top, .penalty-area-bottom,
.center-circle-outer, .goal-area-top, .goal-area-bottom,
.corner-arc-top-left, .corner-arc-top-right,
.corner-arc-bottom-left, .corner-arc-bottom-right {
    content: '';
    position: absolute;
    border-color: var(--pitch-line);
    border-style: solid;
    border-width: 2px;
}

#football-pitch::before { /* Center line */
    top: 50%; left: 0; right: 0; height: 2px;
    background-color: var(--pitch-line);
    transform: translateY(-50%); border-width: 0;
}
.center-circle-outer {
    top: 50%; left: 50%; width: 18%; height: 12%;
    border-radius: 50%; transform: translate(-50%, -50%);
}
.penalty-area-top { top: 0; left: 15%; width: 70%; height: 18%; border-top: 0; }
.penalty-area-bottom { bottom: 0; left: 15%; width: 70%; height: 18%; border-bottom: 0; }
.goal-area-top { top: 0; left: 30%; width: 40%; height: 7%; border-top: 0; }
.goal-area-bottom { bottom: 0; left: 30%; width: 40%; height: 7%; border-bottom: 0; }
.penalty-spot-top, .penalty-spot-bottom {
    content: ''; position: absolute; left: 50%;
    width: 5px; height: 5px; background-color: var(--pitch-line);
    border-radius: 50%; transform: translateX(-50%);
}
.penalty-spot-top { top: 12%; }
.penalty-spot-bottom { bottom: 12%; }
.corner-arc-top-left, .corner-arc-top-right,
.corner-arc-bottom-left, .corner-arc-bottom-right {
    width: 20px; height: 20px; border-radius: 50%;
}
.corner-arc-top-left { top: -10px; left: -10px; border-top-width: 0; border-left-width: 0; }
.corner-arc-top-right { top: -10px; right: -10px; border-top-width: 0; border-right-width: 0; }
.corner-arc-bottom-left { bottom: -10px; left: -10px; border-bottom-width: 0; border-left-width: 0; }
.corner-arc-bottom-right { bottom: -10px; right: -10px; border-bottom-width: 0; border-right-width: 0; }


/* Player on Pitch - UPDATED with Image */
.player-on-pitch {
    position: absolute;
    width: 70px;
    height: 90px;
    cursor: grab;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    transition: var(--transition-fast);
}

.player-on-pitch .player-image-container {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--background-dark);
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.player-on-pitch .player-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-on-pitch.dragging {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px var(--hapoel-red));
    cursor: grabbing;
    opacity: 0.9;
}
.player-on-pitch:focus {
    outline: none;
    filter: drop-shadow(0 0 10px var(--hapoel-red));
}

/* rainbot/style.css */
.player-on-pitch span.player-name {
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    font-weight: bold;
    color: var(--white);
    margin-top: 5px;
    white-space: nowrap;
    text-shadow: 0 0 4px var(--black);
}

.player-slot.filled-slot span.player-name {
    font-size: clamp(0.6rem, 2.2vw, 0.75rem);
    font-weight: bold;
    color: var(--white);
    margin-top: 5px;
    white-space: nowrap;
    text-shadow: 1px 1px 3px var(--black);
}

/* Player Slot (Mobile) */
.player-slot {
    position: absolute;
    width: 12vw;
    height: 12vw;
    max-width: 60px;
    max-height: 60px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px dashed var(--pitch-line);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--pitch-line);
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 5;
    transform: translate(-50%, -50%);
}
.player-slot:hover, .player-slot:focus {
    background-color: rgba(213, 0, 0, 0.2);
    border-color: var(--hapoel-red);
    outline: none;
}
/* Filled Player Slot (Mobile) - UPDATED with Image */
.player-slot.filled-slot {
    width: 16vw;
    height: 20vw;
    max-width: 70px;
    max-height: 90px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.player-slot.filled-slot .player-image-container {
    width: 15vw;
    height: 15vw;
    max-width: 65px;
    max-height: 65px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--background-dark);
    border: 2px solid var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.player-slot.filled-slot .player-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Pitch Actions */
.pitch-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}


/* 5. PLAYER SELECTION & CARDS */
/* --------------------------- */
.players-selection-section {
    flex: 1;
    min-width: 320px;
    max-width: 500px;
}

#players-list-sections {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.collapsible-header {
    background-color: var(--background-dark);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}
.collapsible-header:hover, .collapsible-header.active {
    background-color: var(--hapoel-red);
    color: var(--white);
}
.collapsible-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: inherit;
}
.collapsible-header::after {
    content: '▼';
    font-size: 1rem;
    transition: transform 0.3s ease;
}
.collapsible-header.active::after {
    transform: rotate(180deg);
}

.collapsible-content {
    background-color: transparent;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease-out, padding-top 0.5s ease-out;
}
.collapsible-content.active {
    max-height: 1000px;
    padding-top: 15px;
}

.players-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.player-card {
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: grab;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}
.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(213, 0, 0, 0.4);
    border-color: var(--hapoel-red);
}
.player-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    cursor: grabbing;
}
.player-card.hidden { display: none; }
.player-card h3 {
    margin: 5px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
}
.player-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.player-card .card-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--hapoel-red);
    color: var(--white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}


/* 6. BUTTONS & FOOTER */
/* ------------------- */
.action-button {
    background-color: var(--hapoel-red);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.action-button:hover {
    background-color: var(--hapoel-red-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.action-button:focus {
    outline: 2px solid var(--hapoel-red);
    outline-offset: 3px;
}
.action-button.secondary {
    background-color: #e0e0e0;
    color: var(--text-primary);
    border: 1px solid #bdbdbd;
}
.action-button.secondary:hover {
    background-color: #d5d5d5;
}

footer {
    background-color: #212121;
    color: var(--text-secondary);
    text-align: center;
    padding: 25px 20px;
    margin-top: 50px;
    font-size: 0.9rem;
    border-top: 1px solid #424242;
}


/* 7. MOBILE PICKER & RESPONSIVE */
/* ------------------------------- */
#mobile-player-picker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#mobile-player-picker.active {
    opacity: 1;
    visibility: visible;
}

.picker-content {
    background-color: var(--background-light);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.picker-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.picker-header h3 {
    color: var(--hapoel-red);
    font-size: 1.4rem;
}
#close-picker {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
#close-picker:hover {
    color: var(--hapoel-red);
    transform: scale(1.1);
}

#picker-players-list {
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#picker-players-list h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}
#picker-players-list .players-list-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}
#picker-players-list .player-card {
    min-height: 100px;
    padding: 10px;
    cursor: pointer;
}

@media (max-width: 1200px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    .pitch-section, .players-selection-section {
        width: 100%;
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    body { font-size: 14px; }
    main { padding: 30px 15px; }
    header h1 {
        font-size: clamp(1.8rem, 7vw, 2.2rem); /* Adjusted font-size for mobile header */
    }
    .pitch-section {
        padding: 15px;
    }
    #football-pitch-wrapper {
        border-width: 2px;
        max-width: 400px;
        margin: 0 auto;
    }
    .players-selection-section { display: none; }
    .formation-selection { display: flex; }
}

@media (min-width: 769px) {
    .hamburger-menu, .side-menu, .overlay { display: none; }
}


/* 8. ACCESSIBILITY & SHARE MODALS */
/* ---------------------------------- */
#accessibility-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--background-light);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 998;
    transition: var(--transition-fast);
    padding: 10px; /* Padding for the image */
}
#accessibility-button:hover {
    transform: scale(1.1);
    background-color: var(--hapoel-red);
    border-color: var(--hapoel-red);
}
#accessibility-button img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keeps aspect ratio */
}

#accessibility-modal, .share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#accessibility-modal.active, .share-modal.active { 
    opacity: 1; 
    visibility: visible; 
}

.accessibility-modal-content, .share-modal-content {
    background-color: var(--background-light);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--border-color);
}

.share-modal-content {
    max-width: 400px;
    text-align: center;
}

.accessibility-modal-header, .share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.accessibility-modal-header h3, .share-modal-header h3 { 
    color: var(--hapoel-red);
    margin: 0;
}

#close-accessibility-modal, #close-share-modal {
    background: none; border: none;
    color: var(--text-secondary);
    font-size: 1.8rem; cursor: pointer;
    transition: var(--transition-fast);
}
#close-accessibility-modal:hover, #close-share-modal:hover { 
    color: var(--hapoel-red); 
    transform: rotate(90deg); 
}

.accessibility-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.accessibility-option-button {
    background-color: #f5f5f5;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
}
.accessibility-option-button:hover {
    background-color: var(--hapoel-red);
    border-color: var(--hapoel-red);
    color: var(--white);
    transform: translateY(-2px);
}
.reset-button {
    grid-column: 1 / -1;
    background-color: var(--hapoel-red-dark);
    color: var(--white);
}
.reset-button:hover { background-color: var(--error-red); }

.share-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f5f5f5;
    transition: var(--transition-fast);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
}

.share-option:hover {
    transform: translateY(-5px);
    background-color: #e0e0e0;
}

.share-option img {
    width: 50px;
    height: 50px;
}

.share-instructions p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}


/* 9. ACCESSIBILITY STATES */
/* -------------------------- */
body.high-contrast { filter: invert(100%) hue-rotate(180deg); }
body.high-contrast img,
body.high-contrast video { filter: invert(100%) hue-rotate(180deg); }
body.underline-links a { text-decoration: underline !important; }
body.large-text { font-size: 1.2em; }
body.text-spacing * { letter-spacing: 0.1em !important; word-spacing: 0.12em !important; }
body.hide-images img:not(#accessibility-button img) { display: none !important; }
body.no-animations *, body.no-animations *::before, body.no-animations *::after {
    animation: none !important;
    transition: none !important;
}
body.large-cursor { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40"><circle cx="20" cy="20" r="18" fill="none" stroke="black" stroke-width="2"/><circle cx="20" cy="20" r="1" fill="black"/></svg>') 20 20, auto !important; }
body.dyslexic-font { font-family: var(--font-dyslexic) !important; }
body.line-height * { line-height: 1.9 !important; }
body.show-descriptions img:not(#accessibility-button img)::after {
    content: attr(alt); display: block; color: var(--text-primary);
    background-color: var(--background-dark); padding: 5px; margin-top: 5px;
    border: 1px solid var(--border-color); font-size: 0.9em; text-align: center;
}