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

body, html {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000;
    color: #fff;
}

#app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
}

.screen.hidden {
    display: none;
}

/* Entry Screen */
.entry-screen {
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.entry-screen h1 {
    font-size: 2.5rem;
    text-align: center;
    font-weight: 600;
}

.input-group {
    width: 100%;
    max-width: 400px;
}

.input-group input {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 2px solid #333;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #666;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    background: #fff;
    color: #000;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
    touch-action: manipulation;
}

button:hover {
    opacity: 0.85;
}

button:active {
    opacity: 0.7;
}

button.secondary {
    background: #333;
    color: #fff;
    margin-top: 10px;
}

/* Loading Screen */
.loading-screen {
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #333;
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Character Screen */
.character-screen {
    gap: 20px;
    padding-bottom: 100px;
}

.character-header {
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

.character-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.character-role {
    font-size: 1.1rem;
    color: #aaa;
}

.character-section {
    background: #1a1a1a;
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid #666;
}

.section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.section-content {
    line-height: 1.6;
    color: #ddd;
}

.mission-box {
    background: #2a1a1a;
    border-left-color: #8b4513;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.stat-item {
    background: #000;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 4px;
}

.action-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(to top, #000 80%, transparent);
}

.action-buttons button {
    flex: 1;
}

/* Mission Screen */
.mission-screen {
    gap: 20px;
    padding-bottom: 100px;
}

.mission-prompt {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.action-input-group {
    display: flex;
    gap: 10px;
}

.action-input-group input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #333;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
}

.action-input-group button {
    padding: 12px 20px;
}

.system-message {
    background: #1a1a1a;
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid #666;
    line-height: 1.6;
    color: #ddd;
}

.result-message {
    background: #1a2a1a;
    border-left-color: #4a8a4a;
    padding: 16px;
    border-radius: 8px;
    line-height: 1.6;
    color: #ddd;
    margin-top: 15px;
}

.result-message.failure {
    background: #2a1a1a;
    border-left-color: #8b4513;
}

.back-button {
    margin-top: 15px;
}