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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    padding: 40px;
}

h1 {
    color: #2d3748;
    font-size: 2.5rem;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: #718096;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.input-section {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.input-section h2 {
    color: #2d3748;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.fruit-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.fruit-btn {
    padding: 20px 24px;
    border: 3px solid #e2e8f0;
    border-radius: 20px;
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fruit-btn:hover {
    border-color: #cbd5e0;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.fruit-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.fruit-btn.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1rem;
    font-weight: bold;
}

input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.calc-button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

.results {
    margin-top: 30px;
}

.results h2 {
    color: #2d3748;
    font-size: 1.6rem;
    margin-bottom: 24px;
}

.primary-results {
    display: grid;
    gap: 18px;
    margin-bottom: 30px;
}

.result-item.primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    padding: 24px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.result-item.primary .label {
    color: #2d3748;
    font-weight: 700;
    font-size: 1.1rem;
}

.result-item.primary .value {
    color: #667eea;
    font-size: 2rem;
    font-weight: 800;
}

.secondary-results {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.secondary-results h4 {
    color: #718096;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    font-weight: 600;
}

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

.result-item-small {
    background: #f7fafc;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-item-small .label {
    color: #718096;
    font-weight: 500;
    font-size: 0.8rem;
}

.result-item-small .value {
    color: #4a5568;
    font-size: 1rem;
    font-weight: 700;
}

.instructions {
    background: #edf2f7;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #48bb78;
}

.instructions h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.instructions ol {
    margin-left: 20px;
    color: #4a5568;
    line-height: 1.8;
}

.instructions li {
    margin-bottom: 8px;
}

.instructions em {
    color: #2d3748;
    font-style: italic;
}

.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-top: 20px;
    padding: 15px 20px;
    max-width: 700px;
    width: 100%;
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .fruit-buttons {
        grid-template-columns: 1fr;
    }
}