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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: clamp(14px, 1.1vw, 17px);
}

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

/* Header */
header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin: 0;
    padding: 0 20px;
}

/* Calculator Section */
.calculator {
    margin: 1.5rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    max-width: 1000px;
}

.calculator:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.input-group {
    margin: 1.5rem 0;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1.05rem);
}

.input-group input {
    width: 100%;
    padding: clamp(0.7rem, 2vw, 1rem);
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.button-group {
    display: flex;
    gap: 15px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

button {
    flex: 1 1 calc(50% - 7.5px);
    padding: clamp(0.8rem, 2vw, 1rem);
    font-size: clamp(0.9rem, 2vw, 1rem);
    min-width: 120px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

button:first-child {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

button:last-child {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Result Section */
#result {
    margin: 1.5rem auto 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f8ff, #e0f2f1);
    border-radius: 15px;
    text-align: center;
    max-width: 1000px;
}

.cagr-result {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1;
    font-weight: 700;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
}

#result:hover .cagr-result {
    transform: scale(1.03);
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.calculation-breakdown {
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    margin-top: 1rem;
    padding: 0 1rem;
    text-align: left;
}

.error {
    color: #e74c3c !important;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    background: #ffebee;
    border-radius: 8px;
}

/* About Section */
.about {
    margin: 2rem auto;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    max-width: 1000px;
}

.about code {
    background: #fff;
    padding: 6px;
    border-radius: 4px;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 1.5rem 0;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.footer-menu {
    margin-bottom: 15px;
}

.footer-menu a {
    color: white;
    margin: 0 12px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: #3498db;
}

.disclaimer {
    border-top: 1px solid #34495e;
    padding: 15px 0;
    margin-top: 15px;
    font-size: clamp(0.8rem, 2vw, 0.85rem);
}

.copyright {
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    margin-top: 8px;
}

/* Content Section */
.content-section {
    margin: 2rem auto;
    max-width: 1000px;
}

.section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.section h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    color: #2c3e50;
    margin-bottom: 1rem;
}

.section h3 {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    color: #34495e;
    margin: 1rem 0;
}

.benefit-list, .application-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.example {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.formula-box {
    background: #e8f4f8;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    margin: 10px 0;
    padding-left: 30px;
    position: relative;
}

.checklist li::before {
    content: "✅";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
}

.pro-tip {
    background: #fff3cd;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.keywords {
    margin-top: 15px;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: #666;
}

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

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h4 {
    margin: 5px 0;
    color: #34495e;
    font-size: clamp(1rem, 3vw, 1.1rem);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator, .about, .section {
        padding: 1rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    button {
        flex: 1 1 100%;
        margin: 0.5rem 0;
    }
    
    .cagr-result {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .benefit-list, .application-list {
        grid-template-columns: 1fr;
    }
    
    .input-group input {
        font-size: 0.9rem;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
    
    .section h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }
    
    header {
        padding: 1rem 0;
    }
    
    .calculator, .about, .section {
        padding: 0.8rem;
    }
    
    .cagr-result {
        font-size: 1.6rem;
    }
    
    .input-group label {
        font-size: 0.9rem;
    }
    
    .footer-menu a {
        margin: 0 8px;
    }
}

@media (max-width: 375px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .cagr-result {
        font-size: 1.4rem;
    }
    
    .section {
        margin: 1rem 0;
        padding: 0.6rem;
    }
    
    .section h2 {
        font-size: 1.3rem;
    }
    
    .section h3 {
        font-size: 1.1rem;
    }
}