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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    color: #2563eb;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #2563eb;
    transform: translateY(-1px);
}

.login-btn {
    background: #2563eb;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #1d4ed8;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.dropdown-toggle:hover {
    background: #f3f4f6;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
    color: #2563eb;
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Calculator Section */
.calculator-section {
    margin-bottom: 4rem;
}

.calculator-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.calculator-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-weight: 600;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.calculate-btn {
    background: #2563eb;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    min-height: 44px;
    touch-action: manipulation;
}

.calculate-btn:hover {
    background: #1d4ed8;
}

/* Result Styles */
.result {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
}

.result.hidden {
    display: none;
}

.result h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.percentage-display {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.percentage-display.good {
    color: #059669;
}

.percentage-display.warning {
    color: #d97706;
}

.percentage-display.danger {
    color: #dc2626;
}

.result-status {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Content Section */
.content-section {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 600;
}

.content-section h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: #1f2937;
    font-weight: 600;
}

.content-section p {
    margin-bottom: 1rem;
    color: #4b5563;
}

.content-section ul {
    margin: 1rem 0 1rem 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.content-section a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.content-section a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    margin-bottom: 1rem;
    color: #2563eb;
}

.footer-brand p {
    color: #d1d5db;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.link-group h4 {
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.link-group a {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.link-group a:hover {
    color: #2563eb;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    padding: 0.5rem;
    min-height: 44px;
    min-width: 44px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        transform: translateY(-100vh);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav a {
        padding: 1rem;
        border-bottom: 1px solid #f3f4f6;
        width: 100%;
        text-align: left;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
        text-align: left;
        padding: 1rem;
        border-bottom: 1px solid #f3f4f6;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8fafc;
        margin: 0;
        border-radius: 0;
        min-width: auto;
        width: 100%;
    }

    .dropdown-menu a {
        padding: 0.75rem 2rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .calculator-card {
        margin: 0 1rem;
        padding: 1.5rem;
    }

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

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .nav {
        gap: 1rem;
    }
    
    .nav a {
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
}

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

    .hero p {
        font-size: 1rem;
    }

    .percentage-display {
        font-size: 2.5rem;
    }
}

/* Tool-specific styles that will be reused */
.tool-navigation {
    background: #f8fafc;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.tool-navigation .container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tool-nav-link {
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tool-nav-link:hover,
.tool-nav-link.active {
    background: #2563eb;
    color: white;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #fecaca;
}

/* Success message */
.success-message {
    background-color: #ecfdf5;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1fae5;
    margin-top: 1rem;
}

/* Tools grid for homepage */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tool-card h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.tool-card h4 a {
    color: #2563eb;
    text-decoration: none;
}

.tool-card h4 a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.tool-card p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
}