:root {
    --color-slate: #4E4F73;
    --color-white: #FFFFFF;
    --color-gold: #d8b457;
    --color-pink: #dfe3f2;
    --color-pink-light: #eef0f7;
    --color-dark-brown: #3b3d58;
    --color-light-gray: #F9F9F9;
    --color-bg-gradient: linear-gradient(180deg, #f8f9fb 0%, #eef1f7 100%);

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 30px rgba(78, 79, 115, 0.15);

    --radius-md: 12px;
    --radius-lg: 20px;

    --font-main: 'OpenSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: var(--color-bg-gradient);
    color: var(--color-slate);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.navbar {
    width: 100%;
    background-color: #ffffff;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(78, 79, 115, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1.5rem;
}

.nav-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    color: #4e4f73;
    text-decoration: none;
    font-size: 1rem;
    text-transform: lowercase;
    font-weight: 500;
}

.nav-link:hover {
    color: #3b3d58;
}

/* ... existing styles ... */

/* Footer (Simplified for Tool) */
.footer {
    width: 100%;
    max-width: 800px;
    margin-top: 3rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    text-align: center;
    border-top: none;
}

.app-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

.header {
    background: var(--color-slate);
    color: var(--color-white);
    padding: 2rem;
    text-align: center;
}

.header h1 {
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    font-size: 1.8rem;
}

.main-content {
    padding: 2rem;
}

/* Controls */
.controls-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 2rem;
}

@media (max-width: 800px) {
    .controls-section {
        grid-template-columns: 1fr;
    }
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-weight: 700;
    color: var(--color-slate);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.select-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    background: var(--color-pink-light);
    transition: all 0.3s ease;
}

.select-wrapper:hover {
    background: #dde2f3;
}

.styled-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--color-dark-brown);
    cursor: pointer;
    appearance: none;
    outline: none;
    transition: all 0.3s ease;
}

.styled-select:focus {
    border-color: var(--color-slate);
    background: var(--color-white);
}

.smart-tools {
    margin-top: -0.5rem;
    margin-bottom: 1.2rem;
    padding: 1rem;
    border: 1px solid rgba(78, 79, 115, 0.16);
    border-radius: var(--radius-md);
    background: #f8f9fc;
}

.smart-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--color-slate);
    font-weight: 600;
    font-size: 0.95rem;
}

.smart-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-slate);
}

.smart-btn {
    margin-left: 0.8rem;
    border: 1px solid var(--color-slate);
    background: transparent;
    color: var(--color-slate);
    border-radius: 10px;
    padding: 0.45rem 0.8rem;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.smart-btn:hover {
    background: rgba(78, 79, 115, 0.09);
}

.compat-hint {
    margin-top: 0.7rem;
    margin-bottom: 0;
    font-size: 0.92rem;
    color: #5f647c;
}

.compat-hint.success {
    color: #2c6f52;
}

.compat-hint.warn {
    color: #8a5a00;
}

/* Results */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.results-section:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none;
}

.card {
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
}

.card-label {
    font-size: 0.85rem;
    color: var(--color-slate);
    opacity: 0.7;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.sub-label {
    font-size: 0.75rem;
    text-transform: none;
    opacity: 0.6;
    font-weight: 400;
}

.card-content {
    font-size: 1.2rem;
    color: var(--color-dark-brown);
    font-weight: 600;
    font-style: italic;
}

.actions-card {
    background: var(--color-light-gray);
    position: relative;
}

.actions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.actions-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--color-dark-brown);
    position: relative;
    padding-left: 20px;
    line-height: 1.5;
}

.actions-list li::before {
    content: "•";
    color: var(--color-slate);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.actions-list li:last-child {
    border-bottom: none;
}

.btn-refresh {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-slate);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Result Formula */
.result-formula {
    background: var(--color-slate);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--color-white);
    box-shadow: var(--shadow-hover);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-formula:hover {
    transform: scale(1.02);
}

.formula-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
    text-transform: uppercase;
    font-weight: 600;
}

.formula-text {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

/* My Decision */
.my-decision-section {
    margin-top: 1rem;
}

.decision-label {
    display: block;
    font-weight: 700;
    color: var(--color-slate);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.decision-input {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.decision-input:focus {
    outline: none;
    border-color: var(--color-slate);
    border-bottom: 4px solid var(--color-slate);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer (Simplified for Tool) */
.footer {
    width: 100%;
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1.2rem;
    }

    .app-container {
        margin-top: 1.2rem;
        border-radius: 14px;
    }

    .main-content {
        padding: 1.2rem;
    }

    .smart-tools {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
    }

    .smart-btn {
        margin-left: 0;
    }
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-nav-link {
    color: var(--color-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.footer-nav-link:hover {
    color: var(--color-white);
    opacity: 0.8;
    text-decoration: underline;
}

.footer-contacts {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-white);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s, transform 0.2s;
}

.footer-telegram-link:hover {
    transform: translateY(-2px);
    color: var(--color-white);
    opacity: 0.85;
    text-decoration: underline;
}

.telegram-icon {
    width: 20px;
    height: 20px;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    width: auto;
    max-width: 350px;
    background: var(--color-slate);
    color: var(--color-white);
    padding: 20px;
    z-index: 9999;
    font-size: 0.9rem;
    line-height: 1.6;
    border-radius: 12px;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    box-shadow: 0 8px 24px rgba(78, 79, 115, 0.4);
    transform: translateY(150px);
    opacity: 0;
}

.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-banner-content {
    position: relative;
}

.cookie-banner-text {
    margin-bottom: 15px;
}

.cookie-banner-accept {
    width: 100%;
    background: var(--color-white);
    color: var(--color-slate);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.cookie-banner-accept:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.cookie-banner-close {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--color-white);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.cookie-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .footer-nav {
        gap: 20px;
        justify-content: space-around;
    }

    .footer-nav-link {
        font-size: 0.85rem;
    }

    .cookie-banner {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 15px;
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

@media (max-width: 600px) {
    .footer-nav {
        gap: 1rem;
        flex-direction: column;
        justify-content: center;
    }

    .footer-nav-link {
        font-size: 0.8rem;
    }

    .footer-contacts {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Google Sheets Link */
.google-sheets-section {
    margin-top: 3rem;
    text-align: center;
    padding: 1.5rem;
    background: #eef1f8;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(78, 79, 115, 0.25);
}

.google-sheets-section p {
    color: var(--color-slate);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    opacity: 0.8;
}

.sheet-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-dark-brown);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

/* Shared top/bottom layout: match Home Standard exactly */
.navbar {
    padding: 20px 0;
    border-bottom: 1px solid rgba(78, 79, 115, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.nav-links {
    gap: 30px;
}

.nav-link {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.app-container {
    width: min(100%, 960px);
    margin: 40px auto 0;
}

.footer {
    background-color: var(--color-slate);
    color: var(--color-white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 80px;
}

.footer-nav {
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.footer-nav-link {
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.6;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.footer-nav-link:hover {
    color: var(--color-white);
    opacity: 0.8;
    text-decoration: underline;
}

.footer-contacts {
    margin-top: 20px;
    gap: 30px;
}

.footer-telegram-link {
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    gap: 8px;
    transition: opacity 0.3s;
}

.footer-telegram-link:hover {
    color: var(--color-white);
    opacity: 0.8;
    text-decoration: underline;
    transform: none;
}

.telegram-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.cookie-banner {
    bottom: 20px;
    right: 20px;
    left: auto;
    max-width: 350px;
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }

    .nav-links {
        gap: 14px;
    }

    .app-container {
        margin: 24px auto 0;
    }

    .footer-nav {
        gap: 20px;
        justify-content: space-around;
    }

    .footer-nav-link {
        font-size: 0.85rem;
    }

    .cookie-banner {
        right: 10px;
        left: 10px;
        bottom: 10px;
        max-width: none;
        padding: 15px;
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

@media (max-width: 600px) {
    .footer-nav {
        gap: 15px;
        flex-direction: column;
        justify-content: center;
    }

    .footer-nav-link {
        font-size: 0.8rem;
    }

    .footer-contacts {
        flex-direction: column;
        gap: 1rem;
    }
}

.sheet-link:hover {
    color: var(--color-slate);
    border-bottom-color: var(--color-slate);
}
