:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-gradient: radial-gradient(circle at top left, #f3f4f6 0%, #e5e7eb 100%);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --accent: #6366f1;
    --radius: 20px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.top-header {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    position: fixed;
    top: 0;
    z-index: 100;
}

.return-button {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 50px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.return-button:hover {
    transform: translateY(-2px);
    background: #fff;
    border-color: var(--accent);
}

.container {
    margin-top: 100px;
    width: 90%;
    max-width: 800px;
    flex: 1;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: fadeIn 0.8s ease-out;
}

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

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

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

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-left: 4px;
}

input {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    background: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.btn-primary {
    flex: 2;
    background: var(--primary-gradient);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    flex: 1;
    background: #fff;
    color: var(--text-muted);
    padding: 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f9fafb;
    color: var(--text-main);
}

.results-container {
    margin-top: 40px;
    transition: all 0.5s ease;
}

.results-container.hidden {
    display: none;
    opacity: 0;
}

.result-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.result-card h3 {
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

.time-value {
    font-size: 3rem;
    font-weight: 800;
    display: block;
    margin-bottom: 20px;
    color: var(--accent);
}

.result-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item .label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-item .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.ads-section {
    margin: 40px 0;
    width: 100%;
    min-height: 100px;
}

.main-footer {
    padding: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .glass-card {
        padding: 24px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .actions {
        flex-direction: column;
    }

    .time-value {
        font-size: 2.2rem;
    }

    .result-details {
        flex-direction: column;
        gap: 15px;
    }
}

.seo-article {
    margin-top: 60px;
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    line-height: 1.8;
}

.seo-article h2 {
    margin: 40px 0 20px;
    font-size: 1.8rem;
    color: var(--text-main);
    border-left: 4px solid var(--accent);
    padding-left: 15px;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

.seo-article h3 {
    margin: 30px 0 15px;
    font-size: 1.4rem;
    color: var(--text-main);
}

.seo-article p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.seo-article ul,
.seo-article ol {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--text-muted);
}

.seo-article li {
    margin-bottom: 10px;
}

.seo-article img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.table-container {
    overflow-x: auto;
    margin: 30px 0;
}

.seo-article table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.seo-article th,
.seo-article td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.seo-article th {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.seo-article tr:last-child td {
    border-bottom: none;
}

.seo-article a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.seo-article a:hover {
    text-decoration: underline;
}

.expert-insight {
    background: rgba(99, 102, 241, 0.05);
    border-left: 4px solid var(--accent);
    padding: 24px;
    margin: 30px 0;
    border-radius: 0 12px 12px 0;
}

.expert-insight p {
    margin-bottom: 0;
    font-style: italic;
    color: var(--text-main);
}

@media (max-width: 600px) {
    .seo-article {
        padding: 24px;
    }

    .seo-article h2 {
        font-size: 1.5rem;
    }
}