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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    font-size: 32px;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-links a:hover {
    background: #f3f4f6;
    color: #667eea;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.hero h1 {
    font-size: 64px;
    margin-bottom: 10px;
}

.tagline {
    font-size: 24px;
    opacity: 0.9;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.3s;
    text-align: center;
}

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

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.card h3 {
    color: #333;
    margin-bottom: 10px;
}

.card p {
    color: #666;
    font-size: 14px;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.page-header h1 {
    font-size: 36px;
}

/* Calculator */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
}

.mix-panel, .result-panel {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ingredient-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

select.form-control {
    flex: 1;
    min-width: 200px;
}

input.form-control {
    width: 120px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Mix List */
.mix-list {
    min-height: 100px;
}

.mix-items {
    list-style: none;
}

.mix-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
}

.mix-name {
    font-weight: 500;
}

.mix-amount {
    color: #667eea;
    font-weight: 600;
}

.btn-remove {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: #f3f4f6;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-box.sugar {
    background: #fef3c7;
}

.stat-box.alcohol {
    background: #dbeafe;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* Save Recipe */
.save-recipe {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.save-recipe .form-control {
    width: 100%;
    margin-bottom: 10px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.data-table th, .data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f9fafb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-drink { background: #dbeafe; color: #1d4ed8; }
.badge-syrup { background: #fef3c7; color: #b45309; }
.badge-alcohol { background: #fee2e2; color: #b91c1c; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

/* Alert */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    color: white;
    opacity: 0.8;
}

/* Responsive - Mobile First */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .nav-brand {
        font-size: 20px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .nav-links {
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 13px;
    }
    
    .nav-links a {
        padding: 6px 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .hero {
        padding: 30px 15px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .tagline {
        font-size: 16px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-icon {
        font-size: 36px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mix-panel, .result-panel {
        padding: 15px;
    }
    
    .ingredient-selector {
        flex-direction: column;
    }
    
    select.form-control, input.form-control {
        width: 100%;
    }
    
    .btn {
        width: 100%;
        padding: 14px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-box {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Tables mobile */
    .data-table {
        font-size: 13px;
    }
    
    .data-table th, .data-table td {
        padding: 10px 8px;
    }
    
    /* Touch-friendly */
    .mix-item {
        padding: 15px;
    }
    
    .btn-remove {
        padding: 8px 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .nav-links {
        font-size: 12px;
    }
    
    .nav-links a {
        padding: 5px 8px;
    }
}
