:root {
    --primary: #4a6fa5;
    --secondary: #6b8e23;
    --background: #f5f5f5;
    --surface: #ffffff;
    --text: #333333;
    --border: #dddddd;
    --shadow: rgba(0, 0, 0, 0.1);
    --insight-bg: #f0f7ff;
    --success: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calculator-container {
    background-color: var(--surface);
    border-radius: 15px;
    box-shadow: 0 6px 25px var(--shadow);
    padding: 30px;
    width: 100%;
    max-width: 800px;
}

h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 2.2rem;
}

.input-section {
    margin-bottom: 25px;
}

textarea {
    width: 100%;
    height: 140px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 15px;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.controls {
    display: flex;
    gap: 15px;
}

select {
    flex: 3;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
}

button {
    padding: 12px 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

button:hover {
    background-color: #3a5a80;
    transform: translateY(-2px);
}

.result-section {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background-color: #f0f7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.result-section h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin: 0;
}

#resultValue {
    color: var(--secondary);
    font-weight: 700;
    font-size: 2.2rem;
}

#copyBtn {
    background-color: var(--secondary);
    padding: 8px 15px;
    font-size: 0.9rem;
}

#copyBtn:hover {
    background-color: #5a7e13;
}

.insight-section {
    margin: 25px 0;
    padding: 20px;
    background-color: var(--insight-bg);
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}

.insight-section h3 {
    color: var(--secondary);
    margin-bottom: 10px;
}

#insightText {
    font-size: 1.1rem;
    line-height: 1.5;
    min-height: 80px;
}

.info-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}

.info-section h3 {
    margin-bottom: 15px;
    color: var(--secondary);
}

.info-section ul {
    padding-left: 25px;
}

.info-section li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Success animation for copy button */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.copied {
    background-color: var(--success) !important;
    animation: pulse 0.5s ease;
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    select, button {
        width: 100%;
    }
    
    .result-section {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .calculator-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .result-section h2 {
        font-size: 1.5rem;
    }
    
    #resultValue {
        font-size: 1.8rem;
    }
}
