/* =========================================
   RecipeWise — Основные стили
   ========================================= */

:root {
    --danger: #dc3545;
    --danger-dark: #b02a37;
    --warning: #ffc107;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-display: 'Playfair Display', serif;
}

body {
    font-family: var(--font-sans);
    background-color: #fafafa;
    overflow-x: hidden;
}

/* Logo */
.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

/* Hero */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    pointer-events: none;
}

.min-vh-50 {
    min-height: 50vh;
}

.opacity-90 {
    opacity: 0.9;
}

/* Category Card */
.category-card {
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

/* Recipe Card */
.recipe-card {
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.recipe-card .card-img-top {
    transition: transform 0.5s;
}

.recipe-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Star Rating */
.star-rating {
    direction: rtl;
    display: inline-flex;
    gap: 2px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #ddd;
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffc107;
}

/* Hover Card */
.hover-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.hover-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
}

/* Footer */
.footer a {
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--danger) !important;
}

/* Flash animation */
.alert {
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2.2rem;
    }
}

/* Admin */
.table > :not(caption) > * > * {
    vertical-align: middle;
}