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

:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #ecf0f1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.dhh-footer-widget {
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3748 100%);
    border-top: 3px solid #4299e1;
    padding: 24px 20px;
    margin-top: 48px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.dhh-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.dhh-footer-text {
    flex: 1;
    min-width: 250px;
}

.dhh-footer-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.dhh-footer-subtitle {
    color: #cbd5e0;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

.dhh-footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #4299e1;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.dhh-footer-cta:hover {
    background-color: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
    color: #ffffff;
}

.dhh-footer-cta svg {
    width: 16px;
    height: 16px;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .dhh-footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .dhh-footer-cta {
        width: 100%;
        justify-content: center;
    }
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* HEADER */
.header {
    background-color: var(--bg-white);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    padding: 2rem 0;
    min-height: 60vh;
}

/* HERO SECTION */
.hero {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    color: var(--bg-white);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 1rem;
    opacity: 0.95;
}

/* CALCULATOR CARD */
.calculator-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* FORMS */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

input[type="number"],
input[type="text"],
input[type="email"],
textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

/* BUTTONS */
.tip-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.tip-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-dark);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tip-btn:hover {
    border-color: var(--primary-color);
}

.tip-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.calc-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.calc-btn:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calc-btn:active {
    transform: translateY(0);
}

.add-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--secondary-color);
    color: var(--bg-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-btn:hover {
    background-color: #2980b9;
}

.lucky-btn {
    background-color: var(--accent-color);
    font-size: 1.2rem;
}

.lucky-btn:hover {
    background-color: #c0392b;
}

/* RESULTS */
.mode-content {
    display: none;
    min-height: 400px;
}

.mode-content.active {
    display: block;
}

.results {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.results.hidden {
    display: none;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 1rem;
}

.result-item.highlight {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-weight: 600;
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1rem 0;
}

.amount {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.result-item.highlight .amount {
    color: var(--bg-white);
}

/* ITEMIZED */
.section-block {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section-block h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.people-list,
.items-list {
    margin-bottom: 1rem;
    min-height: 0;
}

.item-row {
    display: block;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.person-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--bg-light);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.remove-btn {
    background-color: var(--accent-color);
    color: var(--bg-white);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.remove-btn:hover {
    background-color: #c0392b;
}

.breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.person-breakdown {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
}

.person-breakdown h5 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.person-total {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
}

.item-people-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* GAME MODE */
.game-people-list {
    margin: 2rem 0;
    text-align: center;
}

.game-people-list p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background-color: var(--bg-light);
    border-radius: 6px;
    font-weight: 600;
}

.game-result {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color) 100%);
    border-radius: 12px;
    color: var(--bg-white);
}

.game-result.hidden {
    display: none;
}

/* SEO CONTENT */
.seo-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.seo-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.seo-content p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.seo-content ul {
    list-style-position: inside;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.seo-content li {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* FOOTER */
.footer {
    background-color: var(--text-dark);
    color: var(--bg-light);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

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

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--bg-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-link-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 1rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.footer-link-btn:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* UTILITIES */
.hidden {
    display: none !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .seo-content {
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .calculator-card {
        padding: 1rem;
    }

    .mode-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .tip-btn {
        min-width: 60px;
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }

    input[type="number"],
    input[type="text"],
    input[type="email"],
    textarea {
        font-size: 16px;
    }
}