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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --text-color: #0f172a;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-gray: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --max-width: 1200px;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 700;
}

.logo svg {
    flex-shrink: 0;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Tools Section */
.tools-section {
    padding: 80px 0;
    background-color: var(--bg-gray);
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-color);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.tool-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.tool-card.coming-soon {
    opacity: 0.6;
    cursor: default;
}

.tool-card.coming-soon:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color);
}

.tool-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
}

.tool-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tool-card p {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.6;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.about-section h2 {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature {
    text-align: center;
}

.feature h3 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Tool Page Styles */
.tool-page {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.tool-header {
    text-align: center;
    margin-bottom: 48px;
}

.tool-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
}

.tool-header p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.tool-input-area {
    margin-bottom: 32px;
}

.tool-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tool-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.tool-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.tool-results {
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    padding: 24px;
}

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

.result-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.result-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.result-label {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-box {
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
}

.result-box h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.result-box p {
    font-size: 16px;
    color: var(--text-light);
}

.bmi-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 16px 0;
}

.bmi-category {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-info {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border-color);
}

.tool-info h2 {
    font-size: 28px;
    margin-bottom: 16px;
    font-weight: 600;
}

.tool-info h3 {
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 12px;
    font-weight: 600;
}

.tool-info p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}

.tool-info ul {
    margin: 16px 0;
    padding-left: 24px;
}

.tool-info li {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 8px;
}

/* Alert Messages */
.alert {
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .nav {
        gap: 16px;
    }
    
    .nav a {
        font-size: 14px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .tool-header h1 {
        font-size: 32px;
    }
    
    .tool-container {
        padding: 24px;
    }
    
    .tool-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .result-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .logo a {
        font-size: 18px;
    }
    
    .logo svg {
        width: 28px;
        height: 28px;
    }
    
    .result-value {
        font-size: 24px;
    }
}
