/* Kalori Hesaplama Sayfası CSS */

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

.calc-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.calc-hero .hero-content {
    position: relative;
    z-index: 2;
}

.calc-hero .hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.calc-hero .hero-title i {
    margin-right: 1rem;
    color: #ffd700;
    animation: pulse 2s infinite;
}

.calc-hero .hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Calculator Section */
.calculator-section {
    padding: 80px 0;
    background: #f8fafc;
}

.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Search Section */
.search-section {
    padding: 40px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    position: relative;
}

.search-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-header p {
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    outline: none;
    background: rgba(255,255,255,0.95);
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-box input:focus {
    background: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.search-btn {
    padding: 15px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.search-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,107,107,0.4);
}

/* Search Suggestions */
.search-suggestions {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: none;
}

.search-suggestions.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.suggestion-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background: rgba(79,172,254,0.1);
    transform: translateX(5px);
}

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

.suggestion-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.suggestion-info h4 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.suggestion-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Selected Food Section */
.selected-food-section {
    padding: 40px;
    background: white;
    border-bottom: 1px solid #eee;
}

.food-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
}

.food-image img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.3);
}

.food-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.food-info p {
    margin: 0;
    opacity: 0.8;
    font-size: 1rem;
}

/* Portion Selector */
.portion-selector {
    background: #f8fafc;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.portion-selector h3 {
    margin: 0 0 20px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.portion-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.portion-tab {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.portion-tab.active {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
}

.portion-tab:hover:not(.active) {
    border-color: #4facfe;
    color: #4facfe;
}

.portion-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.portion-input input {
    width: 120px;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 600;
}

.portion-input span {
    font-weight: 600;
    color: #666;
}

.portion-slider input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.portion-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4facfe;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(79,172,254,0.3);
}

.portion-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4facfe;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(79,172,254,0.3);
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255,107,107,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255,107,107,0.4);
}

.calculate-btn:active {
    transform: translateY(-1px);
}

/* Results Section */
.results-section {
    padding: 40px;
    background: white;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-header h2 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
}

.reset-btn {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Nutrition Cards */
.nutrition-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.nutrition-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nutrition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.nutrition-card.main-calorie {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    border-color: #ff6b6b;
}

.nutrition-card.main-calorie .card-icon {
    background: rgba(255,255,255,0.2);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #4facfe;
}

.card-content {
    flex: 1;
}

.card-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.card-label {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
}

/* Nutrition Chart */
.nutrition-chart {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.nutrition-chart canvas {
    max-height: 300px;
}

/* Detailed Nutrition */
.detailed-nutrition {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.detailed-nutrition h3 {
    margin: 0 0 20px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nutrition-table {
    display: grid;
    gap: 15px;
}

.nutrition-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nutrition-row:hover {
    background: #e2e8f0;
    transform: translateX(5px);
}

.nutrition-name {
    font-weight: 600;
    color: #333;
}

.nutrition-value {
    font-weight: 700;
    color: #4facfe;
}

/* Popular Foods */
.popular-foods {
    padding: 80px 0;
    background: white;
}

.popular-foods h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

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

.popular-item {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.popular-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #4facfe;
}

.popular-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.popular-item-content {
    padding: 20px;
}

.popular-item h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #333;
}

.popular-item-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popular-calorie {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff6b6b;
}

.popular-category {
    font-size: 0.9rem;
    color: #666;
    background: #f8fafc;
    padding: 4px 12px;
    border-radius: 15px;
}

/* Tips Section */
.tips-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tips-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

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

.tip-card {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.tip-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
}

.tip-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.tip-card p {
    margin: 0;
    opacity: 0.9;
    line-height: 1.6;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #4facfe;
}

.loading-spinner p {
    font-size: 1.2rem;
    margin: 0;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .calc-hero .hero-title {
        font-size: 2.2rem;
    }
    
    .calc-hero .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-section {
        padding: 30px 20px;
    }
    
    .selected-food-section,
    .results-section {
        padding: 30px 20px;
    }
    
    .food-card {
        flex-direction: column;
        text-align: center;
    }
    
    .nutrition-cards {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .results-header h2 {
        text-align: center;
    }
    
    .popular-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .portion-tabs {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .calc-hero {
        padding: 100px 0 60px;
    }
    
    .calc-hero .hero-title {
        font-size: 1.8rem;
    }
    
    .calculator-section {
        padding: 60px 0;
    }
    
    .popular-foods,
    .tips-section {
        padding: 60px 0;
    }
    
    .tips-section h2,
    .popular-foods h2 {
        font-size: 2rem;
    }
}

