/* Custom styles for Recipe Creator */

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding-top: 38px; /* Account for fixed navbar height - reduced by half */
}

/* Breadcrumb Spacing */
.breadcrumb {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Recipe Cards */
.recipe-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    overflow: hidden;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.recipe-image {
    height: 200px;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-image {
    transform: scale(1.05);
}

.recipe-image-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::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="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease;
    border-radius: 15px;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Recipe Detail Styles */
.recipe-header {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(25, 135, 84, 0.1) 100%);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.recipe-meta {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Voice Recorder Styles */
.voice-recorder {
    position: relative;
    overflow: hidden;
}

.voice-recorder::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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>') repeat;
    pointer-events: none;
}

.record-button {
    position: relative;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.record-button:hover {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.record-button.recording {
    animation: recordingPulse 2s ease-in-out infinite;
}

@keyframes recordingPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Audio Visualizer */
.audio-visualizer {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audio-visualizer.active {
    opacity: 1;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-lg {
    border-radius: 12px;
    padding: 0.75rem 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0a4ab8 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Ingredient and Instruction Lists */
.ingredient-item,
.instruction-item {
    transition: all 0.3s ease;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.ingredient-item:hover,
.instruction-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.ingredient-checkbox,
.instruction-checkbox {
    accent-color: var(--primary-color);
}

/* Step Numbers */
.step-number {
    font-weight: bold;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Navigation Enhancements */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Sticky Navbar Styles */
.navbar.fixed-top {
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar.scrolled {
    background-color: rgba(13, 110, 253, 0.85) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .navbar-brand,
.navbar.scrolled .nav-link {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%) !important;
}

.footer-links a {
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #007bff !important;
    text-decoration: underline !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .recipe-header {
        padding: 1.5rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .record-button {
        width: 100px;
        height: 100px;
        font-size: 1.5rem;
    }
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--success-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.border-soft {
    border: 1px solid rgba(0, 0, 0, 0.125) !important;
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}
