* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Helvetica', sans-serif;
    background: #2e241b; /* тёмный древесный */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background: #fef7e9; /* цвет старой бумаги */
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 700px;
    width: 100%;
    border: 1px solid #b89b7b;
}

h1 {
    color: #3d2b1a;
    text-align: center;
    margin-bottom: 5px;
    font-size: 2.2em;
}

.subtitle {
    color: #5c3e2b;
    text-align: center;
    font-style: italic;
    margin-bottom: 25px;
    border-bottom: 1px dashed #b89b7b;
    padding-bottom: 15px;
}

/* Вкладки */
.tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.tab-button {
    background: #e5d5bd;
    color: #3d2b1a;
    padding: 12px 30px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex: 0 1 auto;
}

.tab-button.active {
    background: #7b5a3e;
    color: #fef7e9;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

.tab-button:hover {
    background: #9b7a5e;
    color: white;
    transform: translateY(-2px);
}

/* Контент вкладок */
.tab-content {
    transition: opacity 0.3s;
}

.tab-content.hidden {
    display: none;
}

textarea {
    width: 100%;
    padding: 15px;
    margin: 10px 0 20px;
    border: 2px solid #b89b7b;
    border-radius: 15px;
    font-size: 16px;
    background: #fffcf3;
    resize: vertical;
    font-family: inherit;
}

.primary-btn {
    background: #7b5a3e;
    color: #fef7e9;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #5c402b;
    margin-bottom: 15px;
}

.primary-btn:hover {
    background: #5c402b;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #3d2b1a;
}

.primary-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #3d2b1a;
}

.daily-description {
    text-align: center;
    font-size: 18px;
    color: #5c3e2b;
    margin-bottom: 20px;
    font-style: italic;
}

/* Загрузка */
#loading {
    margin: 30px 0;
    font-size: 22px;
    color: #7b5a3e;
    text-align: center;
    font-style: italic;
}

.loading-dots {
    display: inline-block;
    width: 40px;
    text-align: left;
}

.loading-dots::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* Результат */
#resultArea {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 3px solid #b89b7b;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h2, h3 {
    color: #3d2b1a;
    margin-bottom: 15px;
}

.runes-container {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

/* Карточка руны */
.rune-card {
    background: #e5d5bd;
    border: 4px solid #7b5a3e;
    border-radius: 20px;
    padding: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #2e241b;
    box-shadow: 0 8px 0 #5c402b;
    min-width: 130px;
    text-align: center;
    animation: runeAppear 0.5s ease-out;
    transition: transform 0.2s;
}

.rune-card:hover {
    transform: scale(1.05);
}

/* Для картинок (подготовлено) */
.rune-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

@keyframes runeAppear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.interpretation {
    background: #e5d5bd;
    padding: 25px;
    border-radius: 20px;
    border-left: 7px solid #7b5a3e;
    line-height: 1.7;
    color: #2e241b;
    font-size: 17px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.hidden {
    display: none;
}

/* Адаптация для мобильных */
@media (max-width: 500px) {
    .container {
        padding: 20px;
    }
    .tab-button {
        padding: 10px 20px;
        font-size: 16px;
    }
    .rune-card {
        min-width: 100px;
        font-size: 22px;
        padding: 15px;
    }
}