:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    color: var(--primary-dark);
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

ul,
ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Calculator Section */
.calculator-section {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    padding: 3rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.calculator-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: #ffffff;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-option {
    flex: 1;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option label {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background-color: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.radio-option input[type="radio"]:checked+label {
    background-color: #eff6ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
}

.drink-list {
    margin-bottom: 1rem;
}

.drink-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 1rem;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

.btn-icon {
    width: auto;
    padding: 0.5rem;
}

/* Result Box */
.result-box {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    display: none;
    /* Hidden by default */
    animation: fadeIn 0.5s ease;
}

.result-box.safe {
    background-color: #ecfdf5;
    border: 1px solid #6ee7b7;
}

.result-box.warn {
    background-color: #fffbeb;
    border: 1px solid #fcd34d;
}

.result-box.danger {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
}

.bac-value {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.result-box.safe .bac-value {
    color: var(--secondary-color);
}

.result-box.warn .bac-value {
    color: var(--accent-color);
}

.result-box.danger .bac-value {
    color: var(--danger-color);
}

.time-to-sober {
    text-align: center;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.warnings ul {
    margin-bottom: 0;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
    background-color: var(--surface-color);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.info-card {
    background-color: #f8fafc;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: #f1f5f9;
    font-weight: 700;
    color: var(--text-primary);
}

.faq-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.faq-answer {
    padding-top: 1rem;
    display: none;
    color: var(--text-secondary);
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question {
    color: var(--primary-color);
}

/* Ads */
/* Ads */
.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

/* Footer */
footer {
    background-color: #1e293b;
    color: #94a3b8;
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    color: white;
}

.disclaimer {
    font-size: 0.85rem;
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
}

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

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

@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e2e8f0;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Tooltips */
.tooltip-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #cbd5e1;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    line-height: 18px;
    cursor: help;
    margin-left: 5px;
    position: relative;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #334155;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tooltip-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #334155;
}