/* ===========================================
   Vitally - Premium Design System
   =========================================== */

/* ============ Base Styles ============ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(34, 197, 94, 0.3);
    color: white;
}

/* ============ Custom Scrollbar ============ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(34, 197, 94, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 197, 94, 0.5);
}

/* ============ Navigation ============ */

.nav-link {
    position: relative;
    color: rgba(148, 163, 184, 1);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: white;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #22c55e, #84cc16);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============ Buttons ============ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px -3px rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(34, 197, 94, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: rgba(148, 163, 184, 1);
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

.btn-ghost:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(148, 163, 184, 1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-icon:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

/* ============ Dropdown ============ */

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(148, 163, 184, 1);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* ============ Cards ============ */

.card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s ease;
}

.card:hover {
    border-color: rgba(34, 197, 94, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

.card-dish {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-dish:hover {
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-8px) scale(1.01);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 30px -10px rgba(34, 197, 94, 0.2);
}

.card-dish:hover .card-dish-image {
    transform: scale(1.1);
}

.card-dish-image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Forms ============ */

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.form-input:focus {
    outline: none;
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.form-input:invalid:not(:placeholder-shown) {
    border-color: rgba(239, 68, 68, 0.5);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(203, 213, 225, 1);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-error {
    margin-top: 0.5rem;
    color: #f87171;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* ============ Tags & Badges ============ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.badge-primary {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.badge-warning {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* ============ Stats Cards ============ */

.stat-card {
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #84cc16);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

/* ============ Macro Bar ============ */

.macro-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.macro-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.macro-protein { background: linear-gradient(90deg, #22c55e, #4ade80); }
.macro-carbs { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.macro-fats { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* ============ Rating Stars ============ */

.rating {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
}

.star {
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.2s ease;
}

.star.filled {
    color: #fbbf24;
}

/* ============ Loader ============ */

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #22c55e;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ Skeleton ============ */

.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 25%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============ Glow Effects ============ */

.glow-green {
    box-shadow: 0 0 30px -5px rgba(34, 197, 94, 0.3);
}

.glow-text {
    text-shadow: 0 0 40px rgba(34, 197, 94, 0.5);
}

/* ============ Glass Effect ============ */

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============ Gradients ============ */

.gradient-text {
    background: linear-gradient(135deg, #22c55e 0%, #84cc16 50%, #22c55e 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* ============ Hero Pattern ============ */

.hero-gradient {
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 197, 94, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 0%, rgba(132, 204, 22, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse 50% 30% at 20% 10%, rgba(34, 197, 94, 0.08) 0%, transparent 30%);
}

/* ============ Responsive Utils ============ */

@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .card {
        border-radius: 1rem;
    }
}

/* ============ Print Styles ============ */

@media print {
    .no-print {
        display: none !important;
    }
}
