/* ===========================================
   1. RESET AND BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'TrajanPro-Regular';
    src: url('../shared/fonts/TrajanPro-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'OldeEnglish';
    src: url('../shared/fonts/OldeEnglish.ttf') format('truetype');
}

@font-face {
    font-family: 'HKHOldGlyphs';
    src: url('../shared/fonts/HKH Old Glyphs.ttf') format('truetype');
}

:root {
    --primary-color: #000000;
    --secondary-color: #1a1a1a;
    --accent-color: #ffffff;
    --text-color: #fff;
    --text-secondary: #ccc;
    --transition: all 0.3s ease;
    --menu-font: TrajanPro-Regular, "Trajan Pro", "Times New Roman", serif;
    --health-color: #e74c3c;
    --mental-health-color: #9b59b6;
    --stat-bg: rgba(26, 26, 26, 0.8);
    --border-color: rgba(255, 255, 255, 0.2);
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 255, 255, 0.3);
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-color);
    transition: background-image 0.8s ease-in-out;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===========================================
   2. BACKGROUND VIDEO
   =========================================== */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1;
    opacity: 0.3;
}

/* ===========================================
   3. LEFT CHARACTER SHEET TAB
   =========================================== */
.character-sheet-tab {
    position: fixed;
    top: 0;
    left: 0;
    width: 15%;
    height: 100vh;
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInLeft 0.5s ease-out;
    transition: width 0.3s ease, transform 0.3s ease;
}

.character-sheet-tab.collapsed {
    width: 60px;
    transform: translateX(0);
    backdrop-filter: none;
    box-shadow: none;
}

.character-sheet-tab.collapsed .tab-header,
.character-sheet-tab.collapsed .tab-content {
    display: none;
}

@keyframes slideInLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.tab-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.tab-character-name {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    color: var(--text-color);
    font-size: 1.4rem;
    text-align: center;
    margin: 0 0 0.5rem 0;
    letter-spacing: 1px;
    text-transform: none;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 0;
    font-weight: normal;
    text-decoration: none;
    transition: var(--transition);
}

.tab-character-name:focus {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.25rem;
}

.tab-character-name::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.tab-familier-name {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    color: #888;
    font-size: 1rem;
    text-align: center;
    margin: 0.5rem 0 0 0;
    letter-spacing: 1px;
    text-transform: none;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 0;
    font-weight: normal;
    transition: var(--transition);
}

.tab-character-intentions, .tab-character-classe {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    color: #888;
    font-size: 1rem;
    text-align: center;
    margin: 0.5rem 0 0 0;
    letter-spacing: 1px;
    text-transform: none;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 0;
    font-weight: normal;
    transition: var(--transition);
}

.tab-character-intentions:focus, .tab-character-classe:focus, .tab-familier-name:focus {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.25rem;
}

.tab-character-intentions::placeholder {
    color: #666;
    opacity: 0.7;
}

.tab-character-avantage {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    color: #888;
    font-size: 1rem;
    text-align: center;
    margin: 0.5rem 0 0 0;
    letter-spacing: 1px;
    text-transform: none;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 0;
    font-weight: normal;
    transition: var(--transition);
}

.tab-character-avantage:focus {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.25rem;
}

.tab-character-avantage::placeholder {
    color: #666;
    opacity: 0.7;
}

.tab-header-separator {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-color) 30%, 
        var(--accent-color) 50%, 
        var(--border-color) 70%, 
        transparent 100%);
    margin: 1rem 0;
    opacity: 0.5;
}

.tab-character-details {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.tab-character-folk,
.tab-character-class,
.tab-character-spec {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    color: #888;
    font-size: 1rem;
    text-align: center;
    margin: 0.5rem 0 0 0;
    letter-spacing: 1px;
    text-transform: none;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 0;
    font-weight: normal;
    transition: var(--transition);
}

.tab-character-folk:focus,
.tab-character-class:focus,
.tab-character-spec:focus {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.25rem;
}

.tab-character-folk::placeholder,
.tab-character-class::placeholder,
.tab-character-spec::placeholder {
    color: #666;
    opacity: 0.7;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

/* Content sections - all hidden by default */
#anima-content,
#persona-content-main,
#equipement-content,
#character-1-dice-content,
#character-2-dice-content,
#character-3-dice-content,
#character-4-dice-content,
#grimoire-content,
#character-1-familier-content,
#character-2-familier-content,
#character-3-familier-content,
#character-4-familier-content,
#character-1-connaissances-content,
#character-2-connaissances-content,
#character-3-connaissances-content,
#character-4-connaissances-content {
    display: none;
    transition: all 0.3s ease;
}

#anima-content.hidden,
#persona-content-main.hidden,
#equipement-content.hidden,
#character-1-dice-content.hidden,
#character-2-dice-content.hidden,
#character-3-dice-content.hidden,
#character-4-dice-content.hidden,
#grimoire-content.hidden,
#character-1-familier-content.hidden,
#character-2-familier-content.hidden,
#character-3-familier-content.hidden,
#character-4-familier-content.hidden,
#character-1-connaissances-content.hidden,
#character-2-connaissances-content.hidden,
#character-3-connaissances-content.hidden,
#character-4-connaissances-content.hidden {
    display: none;
}

/* Persona content should be visible by default (legacy) */
#persona-content {
    display: block;
    transition: all 0.3s ease;
}

#persona-content.hidden {
    display: none;
}

.anima-title-button {
    cursor: pointer;
    transition: all 0.3s ease;
}

.anima-title-button:hover {
    opacity: 0.8;
}

/* ===========================================
   MULTIPLE CHARACTER SHEETS LAYOUT
   =========================================== */
.mode-content {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

/* Close button for character sheets */
.sheet-close-btn {
    position: absolute;
    top: 12px;
    right: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    z-index: 1000;
}

.sheet-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.sheet-close-btn i {
    pointer-events: none;
}

/* Ensure content headers have relative positioning for close button */
.content-header,
.anima-content-header,
.persona-content-header,
.equipement-content-header,
.dice-content-header,
.grimoire-content-header,
.familier-content-header,
.connaissances-content-header {
    position: relative;
    /* Remove padding-right to maintain center alignment */
}

/* Multiple sheets layout - stack them vertically with some spacing */
.mode-content:not(.hidden) {
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ===========================================
   3.1 COMPACT CHARACTER SHEET STYLES
   =========================================== */
.character-sheet-compact {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(5px);
    margin-bottom: 1.5rem;;
}

.character-header-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.character-name-compact {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: bold;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    transition: var(--transition);
}

.character-name-compact:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.class-selector-compact {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.8rem;
    transition: var(--transition);
}

.class-selector-compact:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.character-stats-compact {
    margin-bottom: 0rem;
}

.stat-item-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.stat-item-compact label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
}

.stat-labels-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.stat-label-left {
    text-align: left;
}

.stat-label-right {
    text-align: right;
}

.stat-bar-compact {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    height: 18px;
    overflow: hidden;
}

.stat-bar-compact .stat-fill {
    height: 100%;
    transition: width 0.5s ease;
    position: relative;
}

.health-bar .stat-fill {
    background: linear-gradient(90deg, var(--health-color), #c0392b);
}

.mental-health-bar .stat-fill {
    background: linear-gradient(90deg, var(--mental-health-color), #8e44ad);
}

.fatigue-bar .stat-fill {
    background: linear-gradient(90deg, #ffffff, #f0f0f0);
}

.stat-bar-compact .stat-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
}

.mental-health-bar {
    cursor: pointer;
    transition: all 0.3s ease;
}

.mental-health-bar:hover {
    border-color: var(--mental-health-color);
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.3);
}

.fatigue-bar {
    cursor: pointer;
    transition: all 0.3s ease;
}

.fatigue-bar:hover {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.fatigue-status {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 4rem;
    color: #ffffff;
    text-align: center;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.mental-health-status {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.7rem;
    color: var(--mental-health-color);
    text-align: center;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.health-status {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--health-color);
    text-align: center;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.character-attributes-compact {
    margin-bottom: 1rem;
}

.attribute-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    max-width: calc(3 * 120px + 2 * 1rem); /* Limit to max 3 columns: 3*120px + 2*gap */
    margin: 0 auto; /* Center the grid when it's constrained */
}

/* Center the last attribute item if it's alone on the last line */
.attribute-grid-compact .attribute-item-compact:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: fit-content;
}

.attribute-item-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

.attribute-item-compact label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0.1rem
}

.pet-attribute-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    max-width: calc(3 * 120px + 2 * 1rem);
    justify-self: center;
}

.attribute-input-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 2px;
    transition: var(--transition);
    margin: 0.1rem
}

.attribute-input-wrapper:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.attribute-btn {
    width: 20px;
    height: 26px;
    background: none;
    border: none;
    border-radius: 3px;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.attribute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.attribute-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.anima-attributes {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.attribute-input-compact {
    width: 25px;
    height: 26px;
    background: transparent;
    border: none;
    text-align: center;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.attribute-input-compact:focus {
    outline: none;
}

/* Attribute Sub-Inputs Styling */
.attribute-sub-inputs {
    display: flex;
    gap: 2px;
    margin-top: 0.25rem;
    justify-content: center;
}

.attribute-sub-input {
    width: 40px;
    height: 30px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 3px;
    text-align: center;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: bold;
    transition: var(--transition);
    outline: none;
}

.pet-attribute-sub-input {
    width: 60px;
    height: 30px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 3px;
    text-align: center;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: bold;
    transition: var(--transition);
    outline: none;
}

.attribute-sub-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.attribute-sub-input:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.attribute-sub-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-size: 0.6rem;
}

/* Anima and Persona specific styles */
.anima-title, .persona-title {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.anima-title-button {
    background: url('../shared/images/frame_gothic church.png') center/contain no-repeat;
    background-size: 100% 100%;
    border: none;
    padding: 1rem 6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 200px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.96;
}

.anima-title-button:hover {
    filter: blur(1px);
    opacity: 0.6;
    transform: scale(0.98);
}

.anima-button-text {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 1rem;
    color: #000000;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: bold;
    z-index: 1;
    position: relative;
    margin: 0 2rem;
}

.persona-button-text {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 1rem;
    color: #000000;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: bold;
    z-index: 1;
    position: relative;
    margin: 0 1.4rem;
}

.persona-title-button {
    background: url('../shared/images/frame_gothic church.png') center/contain no-repeat;
    background-size: 100% 100%;
    border: none;
    padding: 1rem 6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 200px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.96;
}

.persona-title-button:hover {
    filter: blur(1px);
    opacity: 0.6;
    transform: scale(0.98);
}


.character-talent-compact {
    margin-top: 0rem;
}

.character-talent-compact label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    text-align: center;
}

.character-memento-compact {
    margin-top: 0rem;
}

.character-memento-compact label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    text-align: center;
}

.character-notes-compact {
    margin-top: 0rem;
}

.character-notes-compact label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 0.2rem;
}

.character-notes-compact-label {
    margin-bottom: 0.2rem;
}

.skills-title-center {
    text-align: center;
    margin-bottom: 1rem;
}

.skills-title-center label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    text-align: center;
    display: block;
    margin-bottom: 1rem;
}


.persona-image-compact {
    margin-top: 0rem;
}

.persona-image-compact label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    text-align: center;
}

.section-title-center {
    text-align: center;
    margin-bottom: 0rem;
}

.section-title-center label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    text-align: center;
    display: block;
    margin-bottom: 0.5rem;
}

.talent-textarea-compact {
    width: 100%;
    min-height: 60px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.8rem;
    line-height: 1.3;
    resize: vertical;
    transition: var(--transition);
}

.talent-textarea-compact:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.talent-textarea-compact::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.memento-textarea-compact {
    width: 100%;
    min-height: 120px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.8rem;
    line-height: 1.3;
    resize: vertical;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.memento-textarea-compact:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.memento-textarea-compact::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.notes-textarea-compact {
    width: 100%;
    min-height: 60px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.8rem;
    line-height: 1.3;
    resize: vertical;
    transition: var(--transition);
}

.notes-textarea-compact:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.notes-textarea-compact::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Skills Container Styles */
.skills-container {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
}

.skill-row {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-row:last-child {
    border-bottom: none;
}

.skill-name {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.8rem;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.skill-attribute {
    color: var(--text-secondary);
    text-align: center;
    width: 60px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.skill-bonus {
    color: var(--accent-color);
    text-align: center;
    width: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.skill-bonus-input {
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--accent-color);
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    width: 100%;
    height: 24px;
    padding: 0.1rem 0.2rem;
    transition: var(--transition);
}

.skill-bonus-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.skill-bonus-input:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Editable Skill Inputs */
.skill-name-input,
.skill-attribute-input {
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--text-color);
    font-size: 0.8rem;
    padding: 0.2rem 0.3rem;
    width: 100%;
    height: 24px;
    transition: var(--transition);
}

.skill-name-input {
    text-align: left;
    font-weight: 600;
}

.skill-attribute-input {
    text-align: center;
    font-weight: 600;
    width: 60px;
}

.skill-name-input:focus,
.skill-attribute-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.skill-name-input:hover,
.skill-attribute-input:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Skill Actions */
.skill-actions {
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-delete-skill {
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 3px;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.6rem;
    padding: 0.2rem;
    transition: var(--transition);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-skill:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #fff;
}

/* Add Skill Button */
.btn-add-skill {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    font-family: var(--menu-font);
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-add-skill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-add-skill i {
    font-size: 0.6rem;
}

/* No Skills Message */
.no-skills {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
}

/* Responsive two-column layout for very large screens */
@media (min-width: 2000px) {
    .skills-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
        border: none;
        background: transparent;
    }
    
    .skill-row {
        background: var(--input-bg);
        border: 1px solid var(--input-border);
        border-radius: 6px;
        margin-bottom: 0.1rem;
        border-bottom: none;
    }
    
    .skill-name-input,
    .skill-attribute-input,
    .skill-bonus-input {
        font-size: 0.8rem;
    }
    
    .btn-delete-skill {
        width: 18px;
        height: 18px;
        font-size: 0.5rem;
    }
    
    .skill-row:nth-child(odd) {
        grid-column: 1;
    }
    
    .skill-row:nth-child(even) {
        grid-column: 2;
    }
    
    .skills-container {
        font-size: 0.7rem;
    }
}

/* ===========================================
   3.2 MODIFIER FIELDS
   =========================================== */
.modifier-fields {
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
}

.modifier-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
    overflow: hidden;
}

.modifier-row:last-child {
    margin-bottom: 0;
}

.modifier-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    max-width: 50%;
    box-sizing: border-box;
}

.modifier-inputs-row {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.modifier-input-desc {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    outline: none;
    min-width: 0;
    max-width: 100%;
    height: 30px;
    box-sizing: border-box;
}

.modifier-input-mod {
    width: 45px;
    height: 30px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 0.4rem 0.3rem;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    outline: none;
    text-align: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.modifier-item label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    margin-bottom: 0.1rem;
}

.modifier-input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    outline: none;
    width: 100%;
}

.modifier-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.modifier-input:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.modifier-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-size: 0.8rem;
}

.modifier-input-desc:focus,
.modifier-input-mod:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.modifier-input-desc:hover,
.modifier-input-mod:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.modifier-input-desc::placeholder,
.modifier-input-mod::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-size: 0.8rem;
}

/* Responsive design for modifier fields */
@media (max-width: 1200px) {
    .modifier-row {
        gap: 0.4rem;
    }
    
    .modifier-item {
        max-width: 48%;
    }
}

@media (max-width: 1024px) {
    .modifier-row {
        gap: 0.3rem;
    }
    
    .modifier-item {
        max-width: 45%;
        min-width: 200px;
    }
}

@media (max-width: 900px) {
    .modifier-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modifier-item {
        margin-bottom: 0.25rem;
        max-width: 100%;
        flex: none;
        min-width: auto;
    }
    
    .modifier-inputs-row {
        gap: 0.3rem;
    }
    
    .modifier-input-mod {
        width: 45px;
        font-size: 0.8rem;
        padding: 0.35rem 0.25rem;
    }
    
    .modifier-input-desc {
        font-size: 0.8rem;
        padding: 0.35rem 0.4rem;
    }
}

@media (max-width: 600px) {
    .modifier-row {
        gap: 0.3rem;
    }
    
    .modifier-item {
        margin-bottom: 0.2rem;
    }
    
    .modifier-inputs-row {
        gap: 0.25rem;
    }
    
    .modifier-input-desc,
    .modifier-input-mod {
        font-size: 0.8rem;
        padding: 0.4rem 0.3rem;
    }
}

@media (max-width: 480px) {
    .modifier-row {
        gap: 0.25rem;
    }
    
    .modifier-item {
        margin-bottom: 0.15rem;
    }
    
    .modifier-inputs-row {
        gap: 0.2rem;
    }
    
    .modifier-input-desc,
    .modifier-input-mod {
        font-size: 0.8rem;
        padding: 0.35rem 0.25rem;
    }
}
    
    .modifier-input-mod {
        width: 40px;
        font-size: 0.8rem;
        padding: 0.3rem 0.2rem;
    }
    
    .modifier-input-desc {
        font-size: 0.8rem;
        padding: 0.3rem 0.35rem;
    }


/* ===========================================
   3.3 WOUNDS SECTION
   =========================================== */
.wounds-container {
    width: 100%;
}

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

.wounds-header label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    text-align: center;
    margin: 1rem 0 0 0;
}

.pet-wounds-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pet-wounds-header label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    text-align: center;
}

.wounds-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wounds-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.modifier-wounds {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.wounds-inputs-row {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.wounds-input-desc {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 0.4rem 0.5rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    outline: none;
    min-width: 0;
    max-width: 100%;
    height: 30px;
    box-sizing: border-box;
}

.wounds-input-mod {
    width: 45px;
    height: 30px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 0.4rem 0.3rem;
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    outline: none;
    text-align: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.modifier-wounds label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.1rem;
}

.wounds-input-desc:focus,
.wounds-input-mod:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.wounds-input-desc:hover,
.wounds-input-mod:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.wounds-input-desc::placeholder,
.wounds-input-mod::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-size: 0.8rem;
}

/* Wounds Actions */
.wounds-actions {
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 0.5rem;
}

.btn-delete-wounds {
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 3px;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.6rem;
    padding: 0.2rem;
    transition: var(--transition);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-wounds:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #fff;
}

/* Add Wounds Button */
.btn-add-wounds {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    font-family: var(--menu-font);
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-add-wounds:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-add-wounds i {
    font-size: 0.6rem;
}

/* Responsive design for wounds fields */
@media (max-width: 768px) {
    .wounds-inputs-row {
        gap: 0.3rem;
    }
    
    .wounds-input-mod {
        width: 45px;
        font-size: 0.8rem;
        padding: 0.35rem 0.25rem;
    }
    
    .wounds-input-desc {
        font-size: 0.7rem;
        padding: 0.35rem 0.4rem;
    }
}

@media (max-width: 600px) {
    .wounds-inputs-row {
        gap: 0.25rem;
    }
    
    .wounds-input-desc,
    .wounds-input-mod {
        font-size: 0.8rem;
        padding: 0.4rem 0.3rem;
    }
}

@media (max-width: 480px) {
    .wounds-inputs-row {
        gap: 0.2rem;
    }
    
    .wounds-input-desc,
    .wounds-input-mod {
        font-size: 0.8rem;
        padding: 0.35rem 0.25rem;
    }
    
    .wounds-input-mod {
        width: 40px;
        font-size: 0.8rem;
        padding: 0.3rem 0.2rem;
    }
    
    .wounds-input-desc {
        font-size: 0.7rem;
        padding: 0.3rem 0.35rem;
    }
}

/* ===========================================
   3.4 SECTION SEPARATOR
   =========================================== */
.section-separator {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-color) 20%, 
        var(--accent-color) 50%, 
        var(--border-color) 80%, 
        transparent 100%);
    margin: 1rem 0;
    border-radius: 1px;
    opacity: 0.6;
    position: relative;
}

.section-separator::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    opacity: 0.8;
}

.section-separator-persona {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-color) 20%, 
        var(--accent-color) 50%, 
        var(--border-color) 80%, 
        transparent 100%);
    margin: 1rem 0;
    border-radius: 1px;
    opacity: 0.6;
    position: relative;
}

.section-separator-equipment {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-color) 20%, 
        var(--accent-color) 50%, 
        var(--border-color) 80%, 
        transparent 100%);
    margin-top: 2.5rem;
    margin-bottom: 2.1rem;
    border-radius: 1px;
    opacity: 0.6;
    position: relative;
}

.section-separator-dice {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-color) 20%, 
        var(--accent-color) 50%, 
        var(--border-color) 80%, 
        transparent 100%);
    margin: 0.5rem 0;
    border-radius: 1px;
    opacity: 0.6;
    position: relative;
}

.section-separator-pet {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-color) 20%, 
        var(--accent-color) 50%, 
        var(--border-color) 80%, 
        transparent 100%);
    margin-top: 1.5rem;
    margin-bottom: 1.1rem;
    border-radius: 1px;
    opacity: 0.6;
    position: relative;
}

/* ===========================================
   3.5 RIGHT EQUIPMENT TAB
   =========================================== */
.equipment-tab {
    position: fixed;
    top: 0;
    right: 0;
    width: 24%;
    height: 100vh;
    background: var(--stat-bg);
    border-left: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInRight 0.5s ease-out;
    transition: width 0.3s ease, transform 0.3s ease;
}

.equipment-tab.collapsed {
    width: 60px;
    transform: translateX(0);
}

.equipment-tab.collapsed .tab-header,
.equipment-tab.collapsed .tab-content {
    display: none;
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===========================================
   TAB TOGGLE BUTTONS
   =========================================== */
.tab-toggle-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--stat-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tab-toggle-btn:hover {
    background: var(--input-bg);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.character-sheet-tab .tab-toggle-btn {
    right: 8px;
}

.equipment-tab .tab-toggle-btn {
    left: -20px;
}

.character-sheet-tab.collapsed .tab-toggle-btn i {
    transform: rotate(180deg);
}

.equipment-tab.collapsed .tab-toggle-btn i {
    transform: rotate(180deg);
}

.equipment-title-button {
    background: url('../shared/images/frame_gothic church.png') center/contain no-repeat;
    background-size: 100% 100%;
    border: none;
    padding: 1rem 6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 200px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.96;
    margin: 0 auto;
}

.equipment-title-button:hover {
    filter: blur(1px);
    opacity: 0.6;
    transform: scale(0.98);
}

.equipment-button-text {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 1rem;
    color: #000000;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: bold;
    z-index: 1;
    position: relative;
    margin: 0 2rem;
}

/* Equipment Sheet Styles */
.equipment-sheet-compact {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    backdrop-filter: blur(5px);
    margin-bottom: 1.5rem;
}

.equipment-section {
    margin-bottom: 1.5rem;
}

.inventory-section {
    margin-bottom: 1.5rem;
}

.money-section {
    margin-bottom: 0rem;
}

.equipment-container, .inventory-container {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.equipment-item, .inventory-item {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 0.5rem;
}

.equipment-item:last-child, .inventory-item:last-child {
    border-bottom: none;
}

.equipment-inputs-row, .inventory-inputs-row {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    width: 100%;
    flex: 1;
}

.equipment-input-name, .inventory-input-name {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--text-color);
    font-size: 0.8rem;
    padding: 0.2rem 0.3rem;
    height: 24px;
    transition: var(--transition);
    min-width: 0;
}

.equipment-input-range, .equipment-input-defense, 
.equipment-input-enchantement,
.equipment-input-effect, .inventory-input-quantity {
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--text-color);
    font-size: 0.8rem;
    padding: 0.2rem 0.3rem;
    height: 24px;
    transition: var(--transition);
    text-align: center;
    width: 60px;
}

.equipment-input-type, .equipment-input-damage {
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--text-color);
    font-size: 0.8rem;
    padding: 0.2rem 0.3rem;
    height: 24px;
    transition: var(--transition);
    text-align: center;
    width: 70px;
}

.equipment-input-name:focus, .equipment-input-damage:focus, 
.equipment-input-range:focus, .equipment-input-defense:focus, 
.equipment-input-type:focus, .equipment-input-effect:focus,
.equipment-input-enchantement:focus,
.inventory-input-name:focus, .inventory-input-quantity:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.equipment-input-name:hover, .equipment-input-damage:hover, 
.equipment-input-range:hover, .equipment-input-defense:hover, 
.equipment-input-type:hover, .equipment-input-effect:hover,
.equipment-input-enchantement:hover,
.inventory-input-name:hover, .inventory-input-quantity:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.equipment-input-name::placeholder, .equipment-input-damage::placeholder, 
.equipment-input-range::placeholder, .equipment-input-defense::placeholder, 
.equipment-input-type::placeholder, .equipment-input-effect::placeholder,
.equipment-input-enchantement::placeholder,
.inventory-input-name::placeholder, .inventory-input-quantity::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-size: 0.7rem;
}

/* Add Equipment Button */
.btn-add-equipment {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    font-family: var(--menu-font);
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.4rem 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-add-equipment:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-add-equipment i {
    font-size: 0.6rem;
}

/* Money Section */
.money-container {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.money-item {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 0.5rem;
}

.money-item:last-child {
    border-bottom: none;
}

.money-inputs-row {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    width: 100%;
    flex: 1;
}

.money-input-name {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--text-color);
    font-size: 0.8rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    padding: 0.2rem 0.3rem;
    outline: none;
    min-width: 0;
}

.money-input-quantity {
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--text-color);
    font-size: 0.8rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    padding: 0.2rem 0.3rem;
    outline: none;
    width: 80px;
    text-align: center;
}

.money-input-name:focus, .money-input-quantity:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.money-input-name:hover, .money-input-quantity:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.money-input-name::placeholder, .money-input-quantity::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-size: 0.7rem;
}

/* Equipment Actions */
.equipment-actions {
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-delete-equipment {
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 3px;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.6rem;
    padding: 0.2rem;
    transition: var(--transition);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-equipment:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #fff;
}

/* ===========================================
   3.6 FILE UPLOAD SYSTEM
   =========================================== */
.file-upload-section {
    margin-bottom: 1.5rem;
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
}

.file-upload-area:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
}

.file-upload-area.dragover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.file-upload-area.file-upload-loading {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    pointer-events: none;
}

.file-upload-area.file-upload-loading .file-upload-content i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-progress {
    width: 100%;
    margin-top: 0.5rem;
}

.upload-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.upload-progress-fill {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.upload-progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    display: block;
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.file-upload-content i {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.file-upload-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.file-list-container {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.file-list-header span {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-clear-all {
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 3px;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-clear-all:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #fff;
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: var(--transition);
    gap: 0.75rem;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.file-item.selected {
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--accent-color);
}

.file-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

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

.file-name {
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.file-meta {
    color: var(--text-secondary);
    font-size: 0.7rem;
    display: flex;
    gap: 0.5rem;
}

.file-size {
    color: var(--text-secondary);
}

.file-date {
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    gap: 0.3rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.btn-file-action {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-file-action:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-file-delete {
    border-color: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.btn-file-delete:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    color: #fff;
}

/* File type specific icons */
.file-icon.image { color: #3498db; }
.file-icon.video { color: #e74c3c; }
.file-icon.audio { color: #f39c12; }
.file-icon.document { color: #2ecc71; }
.file-icon.archive { color: #9b59b6; }
.file-icon.code { color: #1abc9c; }
.file-icon.default { color: var(--text-secondary); }

/* Empty state */
.file-list-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.8rem;
}

/* Loading state */
.file-upload-loading {
    position: relative;
    pointer-events: none;
}

.file-upload-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.file-upload-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

/* Responsive design for file upload */
@media (max-width: 768px) {
    .file-upload-area {
        padding: 1rem;
    }
    
    .file-upload-content i {
        font-size: 1.5rem;
    }
    
    .file-upload-content p {
        font-size: 0.8rem;
    }
    
    .file-item {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .file-name {
        font-size: 0.7rem;
    }
    
    .file-meta {
        font-size: 0.6rem;
    }
    
    .file-actions {
        opacity: 1; /* Always show on mobile */
    }
}

/* ===========================================
   3.7 CHARACTER SHEETS
   =========================================== */
.character-sheet {
    background: var(--stat-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 800px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
    transition: all 0.3s ease;
}

.character-sheet.hidden {
    display: none;
}

.character-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.character-name {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    transition: var(--transition);
}

.character-name:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.class-selector {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 150px;
    transition: var(--transition);
}

.class-selector:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.character-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-bar {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    height: 24px;
    overflow: hidden;
}

.stat-bar .stat-fill {
    height: 100%;
    transition: width 0.5s ease;
    position: relative;
}

.health-bar {
    position: relative;
    width: 100%;
    height: 25px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    margin: 0 auto;
}

.fatigue-bar {
    position: relative;
    width: 100%;
    height: 25px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    margin: 0 auto;
}

.health-bar .stat-fill {
    background: linear-gradient(90deg, var(--health-color), #c0392b);
}

.mental-health-bar .stat-fill {
    background: linear-gradient(90deg, var(--mental-health-color), #8e44ad);
}

.mental-health-bar {
    cursor: pointer;
    transition: all 0.3s ease;
}

.mental-health-bar:hover {
    border-color: var(--mental-health-color);
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.3);
}

.health-bar {
    cursor: pointer;
    transition: all 0.3s ease;
}

.health-bar:hover {
    border-color: var(--health-color);
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.3);
}

.stat-bar .stat-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.health-status, .mental-health-status {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.health-status {
    color: var(--health-color);
}

.mental-health-status {
    color: var(--mental-health-color);
}

.character-attributes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.attribute-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.attribute-item label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.attribute-input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    width: 60px;
    transition: var(--transition);
}

.attribute-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.character-notes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.character-notes label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.notes-textarea {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 1rem;
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.notes-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Responsive design for character sheets */
@media (max-width: 768px) {
    .character-sheet {
        margin: 1rem;
        padding: 1rem;
    }
    
    .character-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .character-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .character-attributes {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .character-attributes {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .attribute-input {
        width: 50px;
        font-size: 1rem;
    }
}

/* ===========================================
   4. MAIN CONTAINER
   =========================================== */
.journey-container {
    flex: 1;
    padding: 0rem;
    background: none;
    position: relative;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ===========================================
   4.0 CHARACTER SELECTION SECTION
   =========================================== */
.section {
    margin: 0rem 0;
    padding: 0rem;
    animation: fadeInUp 1s ease-out;
}

/* Anima Content Main - Moved from Tab */
.anima-content-main {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(0, 0, 0, 0.9));
    border: 2px solid var(--border-color);
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 600px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.anima-content-main.hidden {
    display: none;
}

.anima-content-main .anima-content-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.anima-content-main .anima-content-header h2 {
    font-family: var(--menu-font);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.anima-content-main .anima-content-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.anima-content-main .anima-content-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Responsive design for main anima content */
@media (max-width: 768px) {
    .anima-content-main {
        margin: 1rem;
        padding: 1rem;
    }
    
    .anima-content-main .anima-content-header h2 {
        font-size: 2rem;
    }
}

/* ===========================================
   PERSONA CONTENT MAIN - MOVED FROM TAB
   =========================================== */
.persona-content-main {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(0, 0, 0, 0.9));
    border: 2px solid var(--border-color);
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 600px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.persona-content-main.hidden {
    display: none;
}

.persona-content-main .persona-content-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.persona-content-main .persona-content-header h2 {
    font-family: var(--menu-font);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.persona-content-main .persona-content-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.persona-content-main .persona-content-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Content wrapper for side-by-side layout */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 70%;
    margin: 2rem auto;
    align-items: flex-start;
}

.content-wrapper .anima-content-main,
.content-wrapper .persona-content-main {
    flex: 1;
    max-width: none;
    margin: 0;
}

/* When only one content section is visible, center it */
.content-wrapper:has(.anima-content-main:not(.hidden):only-child),
.content-wrapper:has(.persona-content-main:not(.hidden):only-child) {
    justify-content: center;
}

.content-wrapper:has(.anima-content-main:not(.hidden):only-child) .anima-content-main,
.content-wrapper:has(.persona-content-main:not(.hidden):only-child) .persona-content-main {
    max-width: 600px;
}

/* ===========================================
   ADDITIONAL CONTENT SECTIONS STYLES
   =========================================== */
.equipement-content-main,
.dice-content-main,
.grimoire-content-main,
.familier-content-main,
.connaissances-content-main {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(0, 0, 0, 0.9));
    border: 2px solid var(--border-color);
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 600px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.equipement-content-main .equipement-content-header,
.dice-content-main .dice-content-header,
.grimoire-content-main .grimoire-content-header,
.familier-content-main .familier-content-header,
.connaissances-content-main .connaissances-content-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.equipement-content-main .equipement-content-body,
.familier-content-main .familier-content-body,
.connaissances-content-main .connaissances-content-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.grimoire-content-main .grimoire-content-body {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.dice-content-main .dice-content-body {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}


/* Content wrapper for side-by-side layout - updated to include all content types */
.content-wrapper .anima-content-main,
.content-wrapper .persona-content-main,
.content-wrapper .equipement-content-main,
.content-wrapper .dice-content-main,
.content-wrapper .grimoire-content-main,
.content-wrapper .familier-content-main,
.content-wrapper .connaissances-content-main {
    flex: 1 1 calc(32% - 1.32rem);
    min-width: 300px;
    max-width: none;
    margin: 0;
}

/* When only one content section is visible, center it */
.content-wrapper:has(.anima-content-main:not(.hidden):only-child),
.content-wrapper:has(.persona-content-main:not(.hidden):only-child),
.content-wrapper:has(.equipement-content-main:not(.hidden):only-child),
.content-wrapper:has(.dice-content-main:not(.hidden):only-child),
.content-wrapper:has(.grimoire-content-main:not(.hidden):only-child),
.content-wrapper:has(.familier-content-main:not(.hidden):only-child),
.content-wrapper:has(.connaissances-content-main:not(.hidden):only-child) {
    justify-content: center;
}

.content-wrapper:has(.anima-content-main:not(.hidden):only-child) .anima-content-main,
.content-wrapper:has(.persona-content-main:not(.hidden):only-child) .persona-content-main,
.content-wrapper:has(.equipement-content-main:not(.hidden):only-child) .equipement-content-main,
.content-wrapper:has(.dice-content-main:not(.hidden):only-child) .dice-content-main,
.content-wrapper:has(.grimoire-content-main:not(.hidden):only-child) .grimoire-content-main,
.content-wrapper:has(.familier-content-main:not(.hidden):only-child) .familier-content-main,
.content-wrapper:has(.connaissances-content-main:not(.hidden):only-child) .connaissances-content-main {
    flex: 1 1 auto;
    max-width: 600px;
    min-width: auto;
}

/* Responsive design for all content sections */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        gap: 1rem;
        margin: 1rem;
    }
    
    .persona-content-main,
    .anima-content-main,
    .equipement-content-main,
    .dice-content-main,
    .grimoire-content-main,
    .familier-content-main,
    .connaissances-content-main {
        margin: 0;
        padding: 1rem;
    }
    
    .persona-content-main .persona-content-header h2,
    .anima-content-main .anima-content-header h2,
    .equipement-content-main .equipement-content-header h2,
    .dice-content-main .dice-content-header h2,
    .grimoire-content-main .grimoire-content-header h2,
    .familier-content-main .familier-content-header h2,
    .connaissances-content-main .connaissances-content-header h2 {
        font-size: 2rem;
    }
}

.section-title {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 2.5rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: normal;
}

.characters-row {
    display: flex;
    justify-content: center;
    gap: 4%;
    flex-wrap: wrap;
    margin: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    border: none;
    padding: 0rem 0;
    transition: transform 0.3s ease;
}

.characters-row.footer-visible {
    transform: translateY(-40%);
    transition: transform 0.2s ease;
}

.character-card {
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: none;
    box-shadow: none;
    transition: all 0.3s ease;
    min-width: 17%;
    position: relative;
    overflow: hidden;
}

/* Anima selected state */
.character-card.anima-selected {
    background: rgba(138, 43, 226, 0.1);
    border: 2px solid rgba(138, 43, 226, 0.5);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

.character-card.anima-selected .character-icon {
    filter: brightness(1.2) saturate(1.3);
}

.character-card.anima-selected .character-icon[alt="Anima"] {
    filter: brightness(1.5) saturate(1.5) drop-shadow(0 0 10px rgba(138, 43, 226, 0.8));
}

.character-camera {
    width: 100%;
    height: 260px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.character-camera img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.character-camera:hover img {
    transform: scale(1.05);
}

.character-name-button {
    width: 100%;
    height: 5rem;
    background: url('../shared/images/frame_gothic church.png') center/contain no-repeat;
    background-size: 100% 100%;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #000000;
    font-size: 1.1rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 1rem;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.character-name-button:hover {
    filter: blur(1px);
    opacity: 0.8;
    transform: translateY(-2px) scale(0.98);
}

.character-name-button:focus {
    outline: none;
    filter: blur(1px);
    opacity: 0.8;
}

.character-name-text {
    display: block;
    text-align: center;
    font-weight: bold;
    z-index: 1;
    position: relative;
    margin: 0 2rem;
}

.character-items {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.character-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.8;
}

.character-icon:hover {
    transform: scale(1.1);
    border-color: var(--accent-color);
    opacity: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Active state for character icons when their content is shown */
.character-icon.active {
    border: 3px solid var(--accent-color);
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    filter: brightness(1.2) saturate(1.3);
}

.character-icon.active:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}


.character-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Enhanced tooltip styles for character items icons */
.character-icon {
    position: relative;
}

.character-icon::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: var(--accent-color);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: var(--menu-font);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.character-icon::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.character-icon:hover::after,
.character-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Character selection animations */
.character-card {
    animation: slideInUp 0.6s ease-out;
}

.character-card:nth-child(1) {
    animation-delay: 0.1s;
}

.character-card:nth-child(2) {
    animation-delay: 0.2s;
}

.character-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design for character selection */
@media (max-width: 768px) {
    .characters-row {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .character-card {
        min-width: 250px;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .character-card {
        min-width: 200px;
        max-width: 250px;
        padding: 1rem;
    }
    
    .character-camera {
        height: 150px;
    }
    
    .section-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .stream-icon {
        width: 35px;
        height: 35px;
    }
}

/* ===========================================
   4.1 JOURNEY HEADER
   =========================================== */
.journey-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out;
}

.journey-title {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 3.5rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: normal;
    animation: glow 2s ease-in-out infinite alternate;
}

.journey-subtitle {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
    margin-bottom: 1rem;
}

.connection-status {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.connection-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e74c3c;
    animation: pulse 2s infinite;
}

.connection-dot.connected {
    background-color: #27ae60;
}

.sync-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--mental-health-color);
    margin-left: 1rem;
}

.sync-indicator i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================================
   4.2 FILE PREVIEW SYSTEM
   =========================================== */
.file-preview-container {
    position: relative;
    width: 70%;
    height: 800px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    margin: 0 auto 1rem auto;
}

.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.file-preview-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-preview-name {
    color: var(--text-color);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.file-preview-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.file-preview-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-file-preview-close {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-file-preview-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-file-preview-zoom {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-file-preview-zoom:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.file-preview-content {
    height: calc(100% - 80px);
    overflow: hidden;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: grab;
}

.file-preview-content:active {
    cursor: grabbing;
}

/* Interactive image container */
.interactive-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image preview */
.file-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease-out;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}

.file-preview-image:active {
    cursor: grabbing;
}

/* Interactive image controls */
.image-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.image-control-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    color: white;
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.image-control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.image-control-btn:active {
    transform: scale(0.95);
}

/* Zoom indicator */
.zoom-indicator {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    z-index: 10;
}

/* Other player interaction indicators */
.player-interaction-indicator {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    background: rgba(255, 255, 255, 0.8);
    z-index: 15;
    pointer-events: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Drag cursor states */
.file-preview-content.dragging {
    cursor: grabbing;
}

.file-preview-content.dragging .file-preview-image {
    cursor: grabbing;
}

/* Interactive image hover effects */
.interactive-image-container:hover .image-controls {
    opacity: 1;
}

.image-controls {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* Smooth transitions for image transforms */
.file-preview-image {
    transition: transform 0.1s ease-out;
}

/* Loading state for images */
.file-preview-image.loading {
    opacity: 0.5;
    filter: blur(2px);
}

.file-preview-image.loaded {
    opacity: 1;
    filter: none;
}

/* Video preview */
.file-preview-video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Audio preview */
.file-preview-audio {
    width: 100%;
    max-width: 500px;
}

/* Document preview */
.file-preview-document {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Text preview */
.file-preview-text {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow: auto;
}

/* Unsupported file type */
.file-preview-unsupported {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-secondary);
    text-align: center;
}

.file-preview-unsupported i {
    font-size: 4rem;
    opacity: 0.5;
}

.file-preview-unsupported p {
    font-size: 1.1rem;
    margin: 0;
}

.file-preview-download {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.file-preview-download:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Responsive design for file preview */
@media (max-width: 768px) {
    .file-preview-container {
        height: 400px;
    }
    
    .file-preview-header {
        padding: 0.75rem 1rem;
    }
    
    .file-preview-name {
        font-size: 1rem;
    }
    
    .file-preview-meta {
        font-size: 0.7rem;
    }
    
    .file-preview-content {
        height: calc(100% - 70px);
        padding: 0.5rem;
    }
    
    .file-preview-unsupported i {
        font-size: 3rem;
    }
    
    .file-preview-unsupported p {
        font-size: 1rem;
    }
}

/* ===========================================
   4.3 TABLE SECTION
   =========================================== */
.table-section {
    text-align: center;
    margin: 0rem 0;
    padding: 0rem;
    height: auto;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.table-control-btn {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.table-control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.table-control-btn:active {
    transform: scale(0.95);
}

.zoom-level-display {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-width: 60px;
    text-align: center;
}

.table-help {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    cursor: help;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.table-help:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Table Image Container */
.table-image-container {
    position: relative;
    width: 100%;
    height: 800px;
    overflow: hidden;
}

.table-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    min-height: 100%;
    object-fit: contain;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-image-container {
        height: 300px;
    }
    
    .table-controls {
        gap: 0.5rem;
    }
    
    .table-control-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .zoom-level-display {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 50px;
    }
}

@media (max-width: 480px) {
    .table-image-container {
        height: 250px;
    }
    
    .table-control-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* ===========================================
   4.3 CHARACTER VISIBILITY CONTROLS
   =========================================== */
.character-visibility-controls {
    margin: 2rem 0;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.character-visibility-controls h3 {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.visibility-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-visibility {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: 1px solid #27ae60;
    color: var(--text-color);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
    min-width: 120px;
    justify-content: center;
}

.btn-visibility:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-visibility.active {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-color: #27ae60;
}

.btn-visibility:not(.active) {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-color: #e74c3c;
}

.btn-visibility:not(.active):hover {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    border-color: #c0392b;
}

.btn-visibility i {
    font-size: 1rem;
}

.btn-visibility:not(.active) i::before {
    content: "\f070"; /* fa-eye-slash */
}

.character-sheet.hidden {
    display: none;
}

/* ===========================================
   4.4 ROOM AUTHENTICATION MODAL
   =========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--stat-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    color: var(--text-color);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    color: var(--text-color);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.75rem;
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 1rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: none;
}

.error-message.show {
    display: block;
}

/* ===========================================
   4.5 ROOM CONTROLS
   =========================================== */
.room-controls {
    background: var(--stat-bg);
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin: 0 auto;
}

.room-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.room-display, .user-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.room-label, .user-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.room-name, .user-name {
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.connected-users {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-list {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.user-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: var(--text-color);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-badge.current-user {
    background: var(--accent-color);
    color: #000;
}

.save-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

.btn {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--mental-health-color);
    border-color: var(--mental-health-color);
}

.btn-primary:hover {
    background: #8e44ad;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--text-color);
    color: var(--text-color);
}

.btn-export, .btn-import {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-export:hover, .btn-import:hover {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-export {
    background: linear-gradient(135deg, #495057, #6c757d);
}

.btn-export:hover {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.btn-import {
    background: linear-gradient(135deg, #495057, #6c757d);
}

.btn-import:hover {
    background: linear-gradient(135deg, #6c757d, #495057);
}

/* ===========================================
   5. FOOTER
   =========================================== */
footer {
    background: rgba(0, 0, 0, 0.098);
    padding: 1rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.7rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    opacity: 0.90;
}

.social-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-link:hover {
    transform: scale(0.96);
    opacity: 0.24;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    filter: brightness(0.8);
    transition: filter 0.3s ease;
}

.social-link:hover .social-icon {
    filter: brightness(1);
}

footer p {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.7rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0px;
    opacity: 0.96;
}

footer p a {
    transition: var(--transition);
    color: #ffffff;
    text-decoration: none;
}

footer p a:hover {
    text-decoration: underline;
}

.footer-logo {
    display: inline-block;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    opacity: 1;
}

.footer-logo:hover {
    opacity: 0.8;
    transform: scale(0.90);
}

.footer-logo-img {
    width: 60px;
    height: 60px;
    filter: brightness(1);
    transition: filter 0.3s ease;
}

.footer-logo:hover .footer-logo-img {
    filter: brightness(0.9);
}

/* ===========================================
   6. NOTIFICATIONS AND FEEDBACK
   =========================================== */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
    font-size: 14px;
}

.update-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.update-notification i {
    margin-right: 8px;
    color: #3498db;
}

/* ===========================================
   7. ANIMATIONS
   =========================================== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 255, 255, 0.1);
    }
    100% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===========================================
   8. RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 1200px) {
    .character-sheet-tab {
        width: 120px;
    }
    
    .equipment-tab {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .journey-container {
        padding: 0rem;
    }

    .journey-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .journey-subtitle {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .room-info {
        flex-direction: column;
        align-items: stretch;
    }

    .character-sheet-tab {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }
    
    .equipment-tab {
        width: 100%;
        height: auto;
        position: relative;
        border-left: none;
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
        top: auto;
        bottom: 0;
    }
    
    .tab-content {
        max-height: 400px;
    }
    
    /* Mobile toggle button adjustments */
    .tab-toggle-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .character-sheet-tab .tab-toggle-btn {
        right: -30px;
    }
    
    .equipment-tab .tab-toggle-btn {
        left: -17.5px;
    }
    
    .character-sheet-tab.collapsed,
    .equipment-tab.collapsed {
        width: 50px;
    }
    
    .attribute-grid-compact {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.75rem;
        max-width: calc(3 * 100px + 2 * 0.75rem); /* Limit to max 3 columns: 3*100px + 2*gap */
    }
}

@media (max-width: 480px) {
    .journey-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .journey-subtitle {
        font-size: 0.9rem;
    }

    .character-sheet-tab {
        width: 100%;
    }
    
    .equipment-tab {
        width: 100%;
    }
    
    .attribute-grid-compact {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 0.5rem;
        max-width: calc(3 * 90px + 2 * 0.5rem); /* Limit to max 3 columns: 3*90px + 2*gap */
    }
    
    .attribute-input-wrapper {
        gap: 1px;
        padding: 1px;
    }
    
    .attribute-btn {
        width: 18px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .attribute-input-compact {
        width: 22px;
        height: 24px;
        font-size: 0.8rem;
    }
}

/* ===========================================
   9. IMAGE UPLOAD STYLES
   =========================================== */

.image-upload-container {
    margin-top: 1rem;
}

.image-preview-container {
    position: relative;
    width: 100%;
    height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    margin-bottom: 0rem;
    overflow: hidden;
}

.persona-image-display {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-align: center;
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.image-placeholder span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.image-upload-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-upload {
    background: transparent;
    color: var(--text-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-upload:hover {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--accent-color);
    transform: translateY(-1px);
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-remove:hover {
    background: #c82333;
    border: 1px solid #c82333;
    transform: translateY(-1px);
}

/* Responsive adjustments for image upload */
@media (max-width: 768px) {
    .image-preview-container {
        height: 150px;
    }
    
    .image-upload-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-upload, .btn-remove {
        width: 100%;
        justify-content: center;
    }
}



/* ===========================================
   CHARACTER 4 ANIMA MODE CONTENT STYLES
   =========================================== */

.character-anima-content {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(0, 0, 0, 0.9));
    border: 2px solid var(--border-color);
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

.character-anima-content.active {
    opacity: 1;
    transform: translateY(0);
}

.anima-content-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.anima-content-header h2 {
    font-family: var(--menu-font);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.anima-content-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.anima-content-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.anima-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.anima-section:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.anima-section h3 {
    font-family: var(--menu-font);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.anima-attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.anima-attribute-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.anima-attribute-item label {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1rem;
    text-align: center;
}

.anima-attribute-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.anima-btn {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anima-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.anima-input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    width: 60px;
    height: 35px;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.anima-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.mental-health-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mental-health-bar {
    position: relative;
    width: 100%;
    height: 25px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    margin: 0 auto;
}

.mental-health-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mental-health-color), #8e44ad);
    transition: width 0.5s ease;
    border-radius: 13px;
}

.mental-health-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-weight: bold;
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.mental-health-status {
    color: var(--mental-health-color);
    font-weight: bold;
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.anima-textarea {
    width: 100%;
    min-height: 120px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: inherit;
}

.anima-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.anima-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.anima-skills-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.anima-skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.anima-skill-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-color);
}

.anima-skill-name {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.anima-skill-name:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.anima-skill-level {
    width: 80px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.anima-skill-level:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.anima-skill-remove {
    background: #dc3545;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anima-skill-remove:hover {
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.anima-btn-add-skill {
    background: transparent;
    border: 2px dashed var(--border-color);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.anima-btn-add-skill:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Responsive design for anima content */
@media (max-width: 768px) {
    .character-anima-content {
        margin: 1rem;
        padding: 1rem;
    }
    
    .anima-content-header h2 {
        font-size: 2rem;
    }
    
    .anima-attributes-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    
    .anima-skill-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .anima-skill-level {
        width: 100%;
    }
}

/* ===========================================
   5. KNOWLEDGE IMAGES SECTION
   =========================================== */

.knowledge-images-section {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.knowledge-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.knowledge-image-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.knowledge-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.knowledge-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: var(--transition);
}

.knowledge-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.knowledge-image-item:hover .knowledge-image-overlay {
    opacity: 1;
}

.knowledge-image-title {
    color: var(--text-color);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.knowledge-preview-icon {
    color: var(--accent-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.knowledge-image-item:hover .knowledge-preview-icon {
    transform: scale(1.1);
}

/* Responsive design for knowledge images */
@media (max-width: 768px) {
    .knowledge-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .knowledge-image {
        height: 120px;
    }
    
    .knowledge-image-overlay {
        padding: 0.75rem;
    }
    
    .knowledge-image-title {
        font-size: 0.8rem;
    }
    
    .knowledge-preview-icon {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .knowledge-images-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .knowledge-image {
        height: 100px;
    }
    
    .knowledge-image-overlay {
        padding: 0.5rem;
    }
    
    .knowledge-image-title {
        font-size: 0.75rem;
    }
}

/* ===========================================
   DICE ROLLER STYLES
   =========================================== */
.dice-roller-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: none;
    border: none;
    border-radius: 15px;
    margin-top: 0.5rem;
}

.dice-roller-container label {
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 1px;
    text-align: center;
    display: block;
    margin-bottom: 0.5rem;
}

.dice-display {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dice-display:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.dice-display:active {
    transform: scale(0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
}

.dice-display.dice-clicked {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4), 0 0 60px rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.dice-result {
    font-size: 4rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
}

.dice-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.171) 0%, transparent 60%);
    border-radius: 20px;
    animation: diceRoll 0.8s ease-in-out;
}

@keyframes diceRoll {
    0% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(360deg);
        opacity: 0;
    }
}

.dice-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.dice-roll-btn {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 1rem 6rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    display: flex; /* Show the roll dice button for testing */
    align-items: center;
    gap: 0.5rem;
}

.dice-roll-btn:hover {
    background: linear-gradient(135deg, #24242492);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.dice-roll-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.dice-roll-btn:disabled {
    background: linear-gradient(135deg, #24242492);
    border-color: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dice-history {
    width: 100%;
    max-width: 400px;
}

.dice-history h4 {
    color: var(--text-color);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.dice-history-list {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
}

.dice-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    border-left: 3px solid var(--accent-color);
    transition: all 0.2s ease;
}

.dice-history-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dice-history-item:last-child {
    margin-bottom: 0;
}

.dice-history-result {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    font-family: 'TrajanPro-Regular', "Trajan Pro", "Times New Roman", serif;
}

.dice-history-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dice-history-user {
    font-weight: bold;
    color: var(--text-color);
}

.dice-history-time {
    font-size: 0.7rem;
}

/* Responsive design for dice roller */
@media (max-width: 768px) {
    .dice-roller-container {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .dice-display {
        width: 150px;
        height: 150px;
    }
    
    .dice-result {
        font-size: 3rem;
    }
    
    .dice-roll-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .dice-display {
        width: 120px;
        height: 120px;
    }
    
    .dice-result {
        font-size: 2.5rem;
    }
    
    .dice-roll-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Character selection visual feedback */
.character-card.familier-selected {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* ===========================================
   REAL-TIME UPDATE INDICATORS
   =========================================== */
.realtime-indicator {
    position: relative;
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 0.5rem 0;
    animation: pulse 1.5s infinite;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.realtime-indicator.anima-updating {
    background: rgba(155, 89, 182, 0.9);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.realtime-sync-indicator {
    position: relative;
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 0.5rem 0;
    animation: slideInDown 0.5s ease-out;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.realtime-sync-indicator.anima-syncing {
    background: rgba(155, 89, 182, 0.9);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.realtime-sync-indicator i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

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

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

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

/* Anima content real-time update highlights */
.anima-content-main.updating {
    border-left: 3px solid rgba(155, 89, 182, 0.8);
    background: rgba(155, 89, 182, 0.05);
    transition: all 0.3s ease;
}

.anima-content-main.syncing {
    border-left: 3px solid rgba(46, 204, 113, 0.8);
    background: rgba(46, 204, 113, 0.05);
    transition: all 0.3s ease;
}

/* Real-time field highlights */
.anima-field-updating {
    background: rgba(155, 89, 182, 0.1) !important;
    border-color: rgba(155, 89, 182, 0.5) !important;
    transition: all 0.3s ease;
}

.anima-field-syncing {
    background: rgba(46, 204, 113, 0.1) !important;
    border-color: rgba(46, 204, 113, 0.5) !important;
    transition: all 0.3s ease;
}