@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-bg: #121212;
    --secondary-bg: #1e1e1e;
    --accent-color: #6c5ce7;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #333333;
    --selected-border-color: #e6c34f;
    --user-bubble: #6c5ce7;
    --ai-bubble: #2a2a2e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.phone-screen {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: var(--primary-bg);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.status-bar {
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
}

.header, .home-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-button {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title, .home-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    flex: 1;
}

.home-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

.genre-selection {
    flex: 1;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.genre-card {
    position: relative;
    height: 150px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.genre-card:hover {
    transform: scale(1.03);
}

.genre-card-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Adds space between elements */
}

.genre-emojis {
    font-size: 28px;
}

.genre-title {
    font-size: 22px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

.genre-subtitle-card {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
}


/* --- Background Images (placeholders removed) --- */
/* You can add your own 'background-image: url(...) here */
.genre-card.urban-fantasy {
    background: linear-gradient(rgba(255, 107, 107, 0.6), rgba(238, 90, 36, 0.6));
}
.genre-card.fantasy {
    background: linear-gradient(rgba(72, 52, 212, 0.6), rgba(104, 109, 224, 0.6));
}
.genre-card.science-fiction {
    background: linear-gradient(rgba(10, 189, 227, 0.6), rgba(0, 107, 166, 0.6));
}

.art-style-selection {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.art-style-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    flex: 1;
}

.art-style-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--secondary-bg);
    border: 2px solid var(--border-color);
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.art-style-card:hover {
    border-color: var(--selected-border-color);
}

.art-style-card.selected {
    border-color: var(--selected-border-color);
    box-shadow: 0 0 15px rgba(230, 195, 79, 0.4);
}

.art-image-wrapper {
    width: 100%;
    height: 120px;
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
}

.art-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-style-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.art-style-subtitle { display: none; }
.chat-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
}
.message.ai {
    background: var(--ai-bubble);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}
.message.user {
    background: var(--user-bubble);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.multi-panel-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 200px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.panel-image {
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.1);
}
.panel-image.main {
    width: 120px;
    height: 140px;
    z-index: 3;
}
.panel-image.left {
    width: 90px;
    height: 110px;
    left: 10px;
    top: 20px;
    z-index: 2;
    transform: rotate(-5deg);
}
.panel-image.right {
    width: 90px;
    height: 110px;
    right: 10px;
    top: 20px;
    z-index: 2;
    transform: rotate(5deg);
}
.panel-image.back {
    width: 80px;
    height: 100px;
    top: 50px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    z-index: 1;
    opacity: 0.7;
}

.quick-reply-container {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}
.quick-reply-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.quick-reply-button {
    padding: 12px;
    background: var(--ai-bubble);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}
.quick-reply-button:hover {
    background: var(--border-color);
    color: var(--text-primary);
}
.hidden { display: none !important; }
.start-button {
    width: 100%;
    padding: 16px;
    background: var(--accent-color);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}
.start-button:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}
.stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 12px 20px;
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
}