:root {
    --bg-color: var(--tg-theme-bg-color, #ffffff);
    --text-color: var(--tg-theme-text-color, #000000);
    --hint-color: var(--tg-theme-hint-color, #999999);
    --link-color: var(--tg-theme-link-color, #2481cc);
    --button-color: rgb(204,85,0);
    --button-text-color: #fff;
    --secondary-bg-color: var(--tg-theme-secondary-bg-color, #f0f0f0);
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

#app {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    flex: 1;
    animation: fadeIn 0.3s ease-in-out;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography */
h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}

p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

/* Images */

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    object-fit: cover;
    aspect-ratio: 1/1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hero-image-original {
    width: auto;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    background-color: var(--button-color);
    color: var(--button-text-color);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: auto;
    transition: opacity 0.2s;
}

.btn:active {
    opacity: 0.8;
}

/* Answers Grid */
.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.answer-card {
    background-color: var(--secondary-bg-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    display: flex;
    flex-direction: column;
}

.answer-card:active {
    transform: scale(0.98);
}

.answer-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.answer-text {
    padding: 10px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 4px;
    background-color: var(--secondary-bg-color);
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--button-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Result Page */
.result-title {
    font-size: 28px;
    color: var(--button-color);
    margin-bottom: 10px;
}

.result-comment {
    font-style: italic;
    border-left: 4px solid var(--button-color);
    padding-left: 16px;
    margin: 20px 0;
}

.final-words {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--secondary-bg-color);
    font-size: 14px;
    color: var(--hint-color);
}

/* Loader */
.loader {
    border: 4px solid var(--secondary-bg-color);
    border-top: 4px solid var(--button-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
