@font-face {
    font-family: 'Rain World';
    src: url('rain-world-menu.otf') format('opentype');
}

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

body {
    font-family: 'Noto Sans', system-ui, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.title {
    font-family: 'Rain World', serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #00b4db, #0083b0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 180, 219, 0.3);
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(0, 180, 219, 0.3); }
    to { text-shadow: 0 0 40px rgba(0, 180, 219, 0.6); }
}

.generator-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.character-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.character-image {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(45deg, #2c1810, #1a0f08);
    color: #888;
    font-style: italic;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 13px;
}

.character-name {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #fff;
    text-align: center;
}

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

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

.label {
    font-weight: 600;
    color: #aaa;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.value {
    font-size: 1.1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-alive { color: #4ade80; }
.status-dead { color: #ef4444; }
.status-unknown { color: #f59e0b; }

.backstory-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.backstory-section h3 {
    margin-bottom: 0.75rem;
    color: #fff;
    font-size: 1.2rem;
}

.backstory-section p {
    color: #ccc;
    line-height: 1.7;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.generate-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.generate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.generate-button:active {
    transform: translateY(0);
}

.backstory-images {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.backstory-images h3 {
    margin-bottom: 1rem;
    color: #fff;
    text-align: center;
}

.image-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.backstory-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.backstory-img:hover {
    border-color: rgba(102, 126, 234, 0.6);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .generator-container {
        grid-template-columns: 1fr;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .backstory-img {
        height: 80px;
    }
}

