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

:root {
    --color-primary: #0000fb;
    --color-black: #000000;
    --color-white: #ffffff;
    --color-cyan: #5bbad5;
    --color-pink: #ff00ff;
    --color-bg-dark: #0a0a0a;
    --color-bg-medium: #1a1a1a;
    --font-main: 'Work Sans', sans-serif;
    --font-mono: 'calling-code', 'Courier New', monospace;
    --font-display: 'chainprinter', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-black);
    color: var(--color-white);
    overflow-x: hidden;
    line-height: 1.8;
    font-size: 16px;
}

#root {
    min-height: 100vh;
}

.app-container {
    width: 100%;
    min-height: 100vh;
}

.layout-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Terminal Section (Left Side) */
#TERMINAL {
    background-color: var(--color-black);
    border-right: 2px solid var(--color-primary);
    padding: 20px;
    width: 300px;
    min-width: 300px;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    z-index: 100;
    flex-shrink: 0;
}

.terminal-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.chat-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-line {
    color: var(--color-white);
    word-wrap: break-word;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.chat-line.system {
    color: var(--color-cyan);
}

.chat-line.user-1 {
    color: #00ff00;
}

.chat-line.user-2 {
    color: #ffff00;
}

.chat-line.user-3 {
    color: #ff00ff;
}

.chat-line.user-4 {
    color: #ff8800;
}

.chat-line.user-5 {
    color: #00ffff;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--color-primary);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-controls {
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--color-white);
    font-size: 11px;
}

.checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-primary);
    background-color: var(--color-black);
    cursor: pointer;
    position: relative;
}

.checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: -3px;
    left: 1px;
    color: var(--color-primary);
    font-size: 14px;
}

.theme-button {
    background-color: rgba(0, 0, 251, 0.1);
    border: 1px solid var(--color-primary);
    padding: 8px 12px;
    color: var(--color-cyan);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-button:hover {
    background-color: rgba(0, 0, 251, 0.2);
    border-color: var(--color-cyan);
}

/* Main Wrapper (contains background + content) */
.main-wrapper {
    flex: 1;
    position: relative;
    min-height: 100vh;
}

/* Background Section (Center/Right) */
#BACKGROUND {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.navigation {
    position: absolute;
    top: 40px;
    left: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: all;
    z-index: 50;
}

.nav-label {
    color: var(--color-white);
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-link {
    color: var(--color-primary);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.nav-link:hover {
    color: var(--color-cyan);
    text-shadow: 0 0 10px var(--color-cyan);
}

.svg-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    max-width: 800px;
    opacity: 0.15;
    pointer-events: none;
}

.punk-jox-logo {
    width: 100%;
    height: auto;
}

.logo-path {
    fill: var(--color-primary);
}

/* Content Section (Main Area) */
#CONTENT {
    position: relative;
    z-index: 10;
    padding: 60px 80px;
    max-width: 1200px;
}

.header {
    margin-bottom: 40px;
}

.title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
    position: relative;
    animation: glitch 3s infinite;
    animation: glitch 3s infinite;
    text-shadow:
        0 0 15px rgba(0, 0, 251, 0.6),
        2px 0 0 rgba(255, 0, 0, 0.5),
        -2px 0 0 rgba(0, 255, 255, 0.5);
}

.title::before {
    content: '▶ ';
    color: var(--color-pink);
}


@keyframes glitch {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.8;
    }
    20% {
        transform: translate(-2px, 1px);
        opacity: 0.9;
    }
    40% {
        transform: translate(2px, -1px);
        opacity: 0.7;
    }
    60% {
        transform: translate(-1px, 2px);
        opacity: 0.8;
    }
    80% {
        transform: translate(1px, -2px);
        opacity: 0.9;
    }
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--color-white);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.version {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-cyan);
    font-style: italic;
}

.character-info {
    margin-bottom: 40px;
    padding: 25px;
    border: 2px solid var(--color-pink);
    background-color: var(--color-bg-medium);
    box-shadow:
        0 0 20px rgba(255, 0, 255, 0.4),
        0 0 40px rgba(255, 0, 255, 0.2),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
}

.character-name {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-pink);
    text-transform: uppercase;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.character-class {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.character-glitch {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-cyan);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 3px solid var(--color-pink);
}

.glitch-description {
    color: rgba(91, 186, 213, 0.9);
    font-size: 14px;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 20px;
    padding-left: 10px;
}

.debt-info {
    color: var(--color-white);
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.8;
}

.class-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.8;
}

/* HP Panel */
.hp-panel {
    position: relative;
    margin-bottom: 40px;
    padding: 25px 30px;
    border-top: 3px solid var(--color-pink);
    border-left: 3px solid var(--color-pink);
    border-right: 3px solid var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    background-color: var(--color-bg-medium);
    box-shadow:
        -5px -5px 20px rgba(255, 0, 255, 0.3),
        5px 5px 20px rgba(0, 0, 251, 0.3);
    overflow: hidden;
}

.hp-skull {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--color-pink);
    text-shadow: 0 0 40px var(--color-pink), 0 0 80px var(--color-pink);
    pointer-events: none;
    z-index: 1;
}

.hp-panel.dead .hp-skull {
    opacity: 0.3;
    animation: pulse-skull 2s infinite;
}

@keyframes pulse-skull {
    0%, 100% {
        opacity: 0.3;
        text-shadow: 0 0 40px var(--color-pink), 0 0 80px var(--color-pink);
    }
    50% {
        opacity: 0.5;
        text-shadow: 0 0 60px var(--color-pink), 0 0 120px var(--color-pink);
    }
}

.hp-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hp-label {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--color-pink);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    flex-shrink: 0;
}

.hp-display {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: flex-end;
}

.hp-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--color-cyan);
    background-color: var(--color-black);
    color: var(--color-cyan);
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.hp-btn:hover {
    background-color: var(--color-cyan);
    color: var(--color-black);
    box-shadow: 0 0 20px var(--color-cyan);
    transform: scale(1.1);
}

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

.hp-values {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-display);
    min-width: 150px;
    justify-content: center;
}

.hp-current {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-white);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.hp-panel.dead .hp-current {
    color: var(--color-pink);
    text-shadow: 0 0 20px var(--color-pink);
}

.hp-separator {
    font-size: 32px;
    color: var(--color-cyan);
}

.hp-max {
    font-size: 32px;
    color: var(--color-cyan);
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border: 1px solid var(--color-primary);
    background-color: var(--color-bg-medium);
    box-shadow:
        0 0 15px rgba(0, 0, 251, 0.3),
        0 0 30px rgba(0, 0, 251, 0.1),
        inset 0 0 15px rgba(0, 0, 251, 0.05);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--color-pink);
    box-shadow:
        0 0 15px rgba(255, 0, 255, 0.4),
        0 0 30px rgba(255, 0, 255, 0.2),
        inset 0 0 15px rgba(255, 0, 255, 0.1);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--color-white);
    text-transform: uppercase;
}

.stat-label::before {
    content: '▸ ';
    color: var(--color-pink);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    text-shadow: 0 0 8px rgba(0, 0, 251, 0.5);
}

.gear-section {
    margin-bottom: 40px;
    padding: 30px;
    border: 2px solid var(--color-cyan);
    background-color: var(--color-bg-medium);
    box-shadow:
        0 0 20px rgba(91, 186, 213, 0.4),
        0 0 40px rgba(91, 186, 213, 0.2),
        inset 0 0 20px rgba(91, 186, 213, 0.1);
}

.gear-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gear-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(91, 186, 213, 0.5);
    margin: 0;
}

.gear-title::before {
    content: '◆ ';
    color: var(--color-pink);
}

.add-item-btn {
    width: 40px;
    height: 40px;
    background-color: var(--color-black);
    border: 2px solid var(--color-pink);
    color: var(--color-pink);
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.add-item-btn:hover {
    background-color: var(--color-pink);
    color: var(--color-black);
    box-shadow: 0 0 20px var(--color-pink);
    transform: scale(1.1) rotate(90deg);
}

.add-item-btn:active {
    transform: scale(0.9) rotate(90deg);
}

.gear-category {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--color-pink);
    text-transform: uppercase;
    margin-top: 25px;
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: 700;
}

.gear-category:first-of-type {
    margin-top: 10px;
}

.gear-item {
    margin-bottom: 18px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 0, 255, 0.2);
}

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

.gear-item strong {
    color: var(--color-white);
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gear-item-name {
    flex: 1;
}

.gear-item-tag {
    font-size: 11px;
    color: rgba(91, 186, 213, 0.6);
    text-transform: lowercase;
    font-weight: 400;
    letter-spacing: 0;
    font-style: italic;
    font-family: var(--font-mono);
}

/* Editable Credits */
.credits-editable {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-cyan);
    color: var(--color-white);
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    padding: 2px 5px;
    width: 80px;
    text-align: center;
    transition: all 0.2s ease;
}

.credits-editable:focus {
    outline: none;
    border-bottom-color: var(--color-pink);
    box-shadow: 0 2px 10px rgba(255, 0, 255, 0.3);
}

/* Magazine Icons */
.mags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 5px 0;
}

.mag-icon {
    display: inline-block;
    width: 20px;
    height: 30px;
    background: linear-gradient(180deg, var(--color-cyan) 0%, var(--color-primary) 100%);
    border: 2px solid var(--color-cyan);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.mag-icon::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 4px;
    background: var(--color-black);
    border-radius: 1px;
}

.mag-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 10px var(--color-pink);
    border-color: var(--color-pink);
}

.mag-icon:active {
    transform: scale(0.9);
}

.mags-label {
    font-size: 14px;
    color: var(--color-cyan);
    margin-right: 5px;
}

.mag-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: var(--color-black);
    border: 2px solid var(--color-pink);
    color: var(--color-pink);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
    line-height: 1;
    padding: 0;
}

.mag-add-btn:hover {
    background-color: var(--color-pink);
    color: var(--color-black);
    box-shadow: 0 0 15px var(--color-pink);
    transform: scale(1.1);
}

.mag-add-btn:active {
    transform: scale(0.9);
}

.gear-item p {
    color: rgba(91, 186, 213, 0.95);
    font-size: 15px;
    font-style: italic;
    margin: 0;
    line-height: 1.7;
    padding-left: 10px;
    border-left: 2px solid rgba(255, 0, 255, 0.3);
}

.actions {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn-print,
.btn-reset {
    padding: 15px 30px;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--color-black);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-print::before {
    content: '▶ ';
    color: var(--color-pink);
}

.btn-print:hover,
.btn-reset:hover {
    background-color: var(--color-primary);
    color: var(--color-black);
    box-shadow: 0 0 20px var(--color-primary);
}

.btn-reset {
    border-color: var(--color-pink);
    color: var(--color-pink);
}

.btn-reset::before {
    content: '◆ ';
}

.btn-reset:hover {
    background-color: var(--color-pink);
    color: var(--color-black);
    box-shadow: 0 0 20px var(--color-pink);
}

.footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--color-primary);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* Edit Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--color-bg-dark);
    border-top: 3px solid var(--color-pink);
    border-left: 3px solid var(--color-pink);
    border-right: 3px solid var(--color-primary);
    border-bottom: 3px solid var(--color-primary);
    box-shadow:
        -5px -5px 30px rgba(255, 0, 255, 0.4),
        5px 5px 30px rgba(0, 0, 251, 0.4);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--color-pink);
}

.modal-title {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--color-pink);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--color-cyan);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-pink);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    flex: 1;
    overflow-y: auto;
}

.modal-textarea {
    width: 100%;
    min-height: 200px;
    background-color: var(--color-bg-medium);
    border: 2px solid var(--color-cyan);
    color: var(--color-white);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.8;
    padding: 15px;
    resize: vertical;
    transition: all 0.2s ease;
}

.modal-textarea:focus {
    outline: none;
    border-color: var(--color-pink);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    border-top: 2px solid var(--color-primary);
    justify-content: space-between;
    align-items: center;
}

.modal-footer-right {
    display: flex;
    gap: 15px;
}

.modal-btn {
    padding: 12px 30px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--color-black);
    border: 2px solid var(--color-cyan);
    color: var(--color-cyan);
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(91, 186, 213, 0.4);
}

.modal-btn-cancel {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.modal-btn-cancel:hover {
    border-color: var(--color-white);
    color: var(--color-white);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.modal-btn-save {
    border-color: var(--color-pink);
    color: var(--color-pink);
}

.modal-btn-save:hover {
    background-color: var(--color-pink);
    color: var(--color-black);
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.4);
}

.modal-btn-delete {
    border-color: #ff0000;
    color: #ff0000;
}

.modal-btn-delete:hover {
    background-color: #ff0000;
    color: var(--color-black);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
}

/* Editable text indicator */
.editable-text {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.editable-text:hover {
    color: var(--color-cyan);
    text-shadow: 0 0 10px var(--color-cyan);
}

.editable-text::after {
    content: '✎';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--color-pink);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.editable-text:hover::after {
    opacity: 0.7;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-pink);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-input,
.form-select {
    width: 100%;
    background-color: var(--color-bg-medium);
    border: 2px solid var(--color-cyan);
    color: var(--color-white);
    font-family: var(--font-main);
    font-size: 16px;
    padding: 12px 15px;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-pink);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235bbad5' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-textarea {
    width: 100%;
    min-height: 120px;
    background-color: var(--color-bg-medium);
    border: 2px solid var(--color-cyan);
    color: var(--color-white);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    padding: 12px 15px;
    resize: vertical;
    transition: all 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--color-pink);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .layout-wrapper {
        flex-direction: column;
    }

    #TERMINAL {
        display: none;
    }

    .main-wrapper {
        width: 100%;
    }

    #BACKGROUND {
        display: none;
    }

    #CONTENT {
        padding: 20px;
    }

    .title {
        font-size: 32px;
    }

    .nav-link {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 18px;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .btn-print,
    .btn-reset {
        width: 100%;
        font-size: 18px;
        padding: 18px 30px;
    }

    .character-name {
        font-size: 32px;
        line-height: 1.4;
    }

    .character-class {
        font-size: 24px;
        line-height: 1.4;
    }

    .character-glitch {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .glitch-description {
        font-size: 16px;
        line-height: 1.9;
        margin-bottom: 25px;
    }

    .character-info {
        padding: 20px;
    }

    .debt-info {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .class-description {
        font-size: 18px;
        line-height: 2;
    }

    .gear-item {
        margin-bottom: 20px;
    }

    .gear-item strong {
        font-size: 19px;
        margin-bottom: 10px;
        flex-wrap: wrap;
    }

    .gear-item-tag {
        font-size: 12px;
    }

    .gear-item p {
        font-size: 17px;
        line-height: 1.9;
        padding-left: 12px;
    }

    .mag-icon {
        width: 24px;
        height: 36px;
    }

    .mag-add-btn {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .credits-editable {
        width: 100px;
        font-size: 18px;
    }

    .title {
        font-size: 28px;
        line-height: 1.3;
        word-break: break-word;
    }

    .title::after {
        font-size: 0.7em;
        margin-top: 3px;
    }

    .subtitle {
        font-size: 14px;
    }

    .version {
        font-size: 11px;
    }

    .gear-section {
        padding: 25px 20px;
    }

    #CONTENT {
        padding: 40px 25px;
    }

    .hp-panel {
        padding: 20px;
    }

    .hp-content {
        flex-direction: column;
        gap: 15px;
    }

    .hp-label {
        align-self: flex-start;
    }

    .hp-display {
        width: 100%;
        justify-content: center;
    }

    .hp-skull {
        font-size: 70px;
    }

    .hp-btn {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }

    .hp-values {
        min-width: 180px;
    }

    .hp-current {
        font-size: 56px;
    }

    .hp-separator,
    .hp-max {
        font-size: 36px;
    }

    .mag-icon {
        width: 24px;
        height: 36px;
    }

    .mag-add-btn {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .credits-editable {
        width: 100px;
        font-size: 18px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-title {
        font-size: 14px;
    }

    .modal-close {
        font-size: 28px;
        width: 35px;
        height: 35px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-textarea {
        font-size: 18px;
        min-height: 250px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer-right {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .modal-btn {
        width: 100%;
        padding: 15px 30px;
        font-size: 16px;
    }

    .editable-text::after {
        display: none;
    }

    .add-item-btn {
        width: 45px;
        height: 45px;
        font-size: 32px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 18px;
        padding: 15px;
    }

    .form-textarea {
        min-height: 150px;
    }
}
