* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    color: #eee;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(30, 30, 46, 0.9);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* ========== ГЛАВНАЯ СТРАНИЦА ========== */
.hero {
    text-align: center;
    padding: 40px 24px;
}

.hero h1 {
    font-size: 2.4em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #aaa;
    margin-bottom: 50px;
}

.hero-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.hero-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 30px 40px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    width: 280px;
    text-align: center;
}

.hero-btn:hover {
    transform: translateY(-5px);
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

.btn-icon {
    font-size: 4em;
    display: block;
    margin-bottom: 15px;
}

.btn-title {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
    color: #ffd700;
}

.btn-desc {
    font-size: 0.9em;
    color: #aaa;
}

.hero-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #666;
    font-size: 0.8em;
}

/* ========== НАВИГАЦИЯ ========== */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
    flex-wrap: wrap;
    gap: 10px;
}

.home-btn, .switch-btn {
    background: rgba(255, 215, 0, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: #ffd700;
    font-size: 14px;
    transition: all 0.2s;
}

.home-btn:hover, .switch-btn:hover {
    background: rgba(255, 215, 0, 0.3);
}

.page-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffd700;
}

/* ========== ОБЩИЕ СТИЛИ ========== */
h1 {
    text-align: center;
    margin-top: 0;
    color: #ffd700;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ccc;
}

input, select {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #444;
    background: #2a2a3a;
    color: white;
    font-size: 16px;
}

input[type="range"] {
    padding: 0;
}

.row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.row > * {
    flex: 1;
}

.switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.switch input {
    width: auto;
    transform: scale(1.2);
    margin: 0;
}

.advanced-panel {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
}

.advanced-panel.show {
    display: block;
}

.results {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0,0,0,0.4);
    border-radius: 16px;
}

.result-card {
    background: #2a2a3a;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.result-card h3 {
    margin: 0 0 10px 0;
    color: #ffd700;
}

.monster-item, .craft-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #444;
}

.monster-name, .craft-name {
    font-weight: bold;
}

.monster-exp, .craft-stats {
    color: #4caf50;
    font-weight: bold;
}

.monster-penalty {
    font-size: 12px;
    color: #888;
    margin-left: 8px;
}

button {
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    padding: 14px 28px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: transform 0.1s;
}

button:active {
    transform: scale(0.98);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.odin-info {
    font-size: 14px;
    color: #aaa;
    margin-top: 5px;
}

.badge {
    background: #ffd700;
    color: #1a1a2e;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 8px;
}

/* Увеличенные иконки в таблице */
.craft-img {
    width: 80px;
    text-align: center;
    padding: 8px;
}

.item-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(0,0,0,0.3);
    padding: 8px;
    transition: transform 0.2s;
}

.item-icon:hover {
    transform: scale(1.1);
}

/* Растянутое поле ввода */
#dataInput {
    width: 100%;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

/* Детали конвертации */
.detail-row {
    background: rgba(0,0,0,0.2);
}

.detail-cell {
    padding: 10px !important;
}

.detail-steps {
    font-size: 12px;
    color: #aaa;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
}

.detail-steps div {
    padding: 4px 0;
    font-family: monospace;
}

details summary {
    cursor: pointer;
    color: #ffd700;
    font-size: 12px;
}

details summary:hover {
    text-decoration: underline;
}

/* Увеличенные ячейки таблицы */
.craft-table th, .craft-table td {
    padding: 12px 8px;
    vertical-align: middle;
}

.craft-name {
    font-weight: bold;
    font-size: 14px;
}

.craft-orig, .craft-gain, .craft-need {
    text-align: center;
    font-size: 14px;
}

.craft-gain {
    color: #4caf50;
    font-weight: bold;
}

.craft-need {
    color: #ff9800;
    font-weight: bold;
}

.craft-total {
    color: #ffd700;
    font-weight: bold;
    font-size: 16px;
}

/* ========== ФУТЕР ========== */
.hero-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
}

.footer-text {
    text-align: center;
    margin-bottom: 30px;
    color: #aaa;
    font-size: 14px;
    line-height: 1.6;
}

.footer-text p {
    margin: 8px 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ccc;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    min-width: 80px;
}

.social-link:hover {
    transform: translateY(-5px);
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

.social-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 16px;
}

.social-link span {
    font-size: 12px;
    font-weight: bold;
}

.footer-copyright {
    text-align: center;
    color: #666;
    font-size: 11px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
    margin: 0;
}

@media (max-width: 600px) {
    .social-links {
        gap: 15px;
    }
    .social-link {
        min-width: 60px;
        padding: 6px;
    }
    .social-icon {
        width: 48px;
        height: 48px;
    }
    .social-link span {
        font-size: 10px;
    }
    .footer-text {
        font-size: 12px;
    }
}

/* Подсветка строк с остатками */
.alert-row {
    background: rgba(255, 0, 0, 0.2) !important;
    border-left: 3px solid #ff4444;
}

.alert-row:hover {
    background: rgba(255, 0, 0, 0.3) !important;
}

/* Дополнительно: можно добавить иконку предупреждения */
.alert-row .craft-name::before {
    content: "⚠️ ";
    font-size: 14px;
}
