/* KVCache Hit Rate Calculator Style */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.input-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.results-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

h2 {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.4rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tooltip {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    margin-top: 5px;
    font-style: italic;
}

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

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.result-card.highlight {
    background: linear-gradient(135deg, #fed7e2, #fbb6ce);
    border-color: #f687b3;
}

.result-card h3 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 1rem;
}

.result-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 5px;
}

.result-unit {
    font-size: 1rem;
    color: #718096;
}

.detailed-results {
    margin-top: 30px;
}

.detailed-results h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.metric-label {
    font-weight: 600;
    color: #4a5568;
}

.metric-value {
    font-weight: bold;
    color: #2d3748;
}

.chart-container {
    margin-top: 30px;
    height: 300px;
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
}

.optimization-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #e6fffa, #b2f5ea);
    border-radius: 12px;
    border: 1px solid #38b2ac;
}

.optimization-section h3 {
    color: #2c7a7b;
    margin-bottom: 15px;
}

.optimization-tip {
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.optimization-tip.success {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
    color: #2f855a;
}

.optimization-tip.warning {
    background: #fffaf0;
    border-left: 4px solid #ed8936;
    color: #c05621;
}

.optimization-tip.info {
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    color: #2b6cb0;
}

.presets-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.presets-section h3 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.preset-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px; /* Button spacing */
}

.preset-btn {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(65, 153, 225, 0.10);
}

.preset-btn:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(65, 153, 225, 0.18);
}

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .result-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .preset-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .preset-btn {
        min-width: 0;
        width: 100%;
    }
}

/* Animation effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-section, .results-section, .presets-section {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar style */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
} 