body {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.87);
    background-color: #000000;
}

#app {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1rem;
    box-sizing: border-box;
    padding: 1rem;
}

.info-panel {
    width: 320px;
    background: rgba(22, 22, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    transition: width 0.25s ease, padding 0.25s ease;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.info-header h1 {
    margin: 0;
    font-size: 1.4rem;
}

#info-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: inherit;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

#info-toggle:hover,
#info-toggle:focus {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-content ul {
    margin: 0;
    padding-left: 1.2rem;
}

.info-panel.collapsed {
    width: auto;
    padding: 0.75rem;
    align-items: center;
}

.info-panel.collapsed .info-header h1,
.info-panel.collapsed .info-content {
    display: none;
}

#game-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 6000;
    padding: 2rem;
    box-sizing: border-box;
}

.image-modal-overlay--visible {
    display: flex;
}

.image-modal {
    width: min(640px, 100%);
    background: rgba(16, 16, 16, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.45);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: min(90vh, 720px);
    overflow: hidden;
}

.image-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.image-modal__title {
    margin: 0;
    font-family: 'Courier', monospace;
    font-size: 1.3rem;
    color: #f7f7dc;
}

.image-modal__close {
    background: transparent;
    border: none;
    color: #f7f7dc;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
}

.image-modal__close:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.image-modal__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    overflow: hidden;
}

.image-modal__label {
    display: block;
    font-family: 'Courier', monospace;
    font-size: 0.95rem;
    color: #dcd4a0;
    margin-bottom: 0.4rem;
}

.image-modal__textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(10, 10, 10, 0.9);
    color: #f7f7dc;
    font-family: 'Courier', monospace;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.image-modal__textarea:disabled {
    opacity: 0.5;
}

.image-modal__images {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.image-modal__file-input {
    display: block;
    width: 100%;
    font-family: 'Courier', monospace;
    font-size: 0.85rem;
    color: #f7f7dc;
}

.image-modal__file-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.image-modal__preview {
    position: relative;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    background: rgba(10, 10, 10, 0.82);
    padding: 1rem;
    min-height: 200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    transition: opacity 0.2s ease;
}

.image-modal__preview--empty {
    border-style: dashed;
}

.image-modal__preview--disabled {
    opacity: 0.6;
    pointer-events: none;
}

.image-modal__preview-image {
    max-width: 100%;
    max-height: 240px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.image-modal__preview-filename {
    font-family: 'Courier', monospace;
    font-size: 0.85rem;
    color: #dcd4a0;
    text-align: center;
    word-break: break-word;
}

.image-modal__placeholder {
    font-family: 'Courier', monospace;
    font-size: 0.85rem;
    color: #b8b089;
    margin: 0;
    text-align: center;
}

.image-modal__status {
    font-family: 'Courier', monospace;
    font-size: 0.85rem;
    min-height: 1.2rem;
    margin: 0;
    color: #dcd4a0;
}

.image-modal__status--error {
    color: #ff9d9d;
}

.image-modal__status--success {
    color: #9dffb0;
}

.image-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.image-modal__button {
    padding: 0.6rem 1.3rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #f7f7dc;
    font-family: 'Courier', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.image-modal__button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.image-modal__button--ghost {
    background: transparent;
}

.image-modal__button--ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
}

.image-modal__button--primary {
    background: rgba(34, 139, 230, 0.9);
    border-color: rgba(34, 139, 230, 0.9);
}

.image-modal__button--primary:hover:not(:disabled) {
    background: rgba(34, 139, 230, 1);
}