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

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #fff8f2;
            color: #3e1f0e;
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }

        /* Animated background */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 48, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 200, 80, 0.3) 0%, transparent 50%);
            animation: backgroundShift 20s ease-in-out infinite;
            pointer-events: none;
            z-index: -1;
        }

        @keyframes backgroundShift {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            33% { transform: translate(-50px, -50px) rotate(2deg); }
            66% { transform: translate(50px, -50px) rotate(-2deg); }
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
            z-index: 1;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
            background: #fff3e5;
            backdrop-filter: blur(20px);
            border: 1px solid #f3c3a4;
            padding: 20px 30px;
            border-radius: 20px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        h1 {
            font-size: 32px;
            background: linear-gradient(135deg, #ff8c42 0%, #f5515f 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-align: center;
            flex: 1;
            font-weight: 700;
        }

        .header-btn {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            cursor: pointer;
            padding: 12px;
            border-radius: 15px;
            transition: all 0.3s ease;
            color: #3e1f0e;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .header-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }

        .header-btn i {
            font-size: 20px;
        }

        .mode-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }

        .mode-card {
            background: #fff3e5;
            backdrop-filter: blur(20px);
            border: 1px solid #f3c3a4;
            border-radius: 20px;
            padding: 30px 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
            position: relative;
            overflow: hidden;
        }

        .mode-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transition: left 0.5s;
        }

        .mode-card:hover::before {
            left: 100%;
        }

        .mode-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            border-color: rgba(255, 255, 255, 0.3);
        }

        .mode-card.active {
            background: rgba(255, 140, 66, 0.2);
            border-color: #ff8c42;
            box-shadow: 0 10px 30px rgba(255, 140, 66, 0.3);
        }

        .mode-icon {
            font-size: 40px;
            margin-bottom: 15px;
            display: inline-block;
            background: linear-gradient(135deg, #ff8c42 0%, #f5515f 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
        }

        .mode-card h3 {
            font-size: 18px;
            color: #3e1f0e;
            font-weight: 600;
        }

        .input-section {
            display: none;
            background: #fff3e5;
            backdrop-filter: blur(20px);
            border: 1px solid #f3c3a4;
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            animation: slideIn 0.5s ease-out;
        }


        .input-group {
            margin-bottom: 25px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            color: #3e1f0e;
            font-weight: 500;
            font-size: 16px;
        }

        input, textarea, select {
            width: 100%;
            padding: 15px 20px;
            border: 2px solid #f3c3a4;
            border-radius: 15px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: #fff3e5;
            color: #3e1f0e;
            backdrop-filter: blur(10px);
        }

        input::placeholder, textarea::placeholder {
            color: #a88e7a;
        }

        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: #ff8c42;
            box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.2);
            background: rgba(255, 255, 255, 0.1);
        }

        textarea {
            resize: vertical;
            min-height: 120px;
        }

        .btn {
            background: linear-gradient(135deg, #ff8c42 0%, #f5515f 100%);
            color: #3e1f0e;
            border: none;
            padding: 15px 30px;
            border-radius: 15px;
            font-size: 18px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            box-shadow: 0 5px 20px rgba(255, 140, 66, 0.3);
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .btn:hover::before {
            left: 100%;
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(255, 140, 66, 0.4);
        }

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

        .btn i {
            font-size: 20px;
        }

        .filters {
            display: none;
            background: #fff3e5;
            backdrop-filter: blur(20px);
            border: 1px solid #f3c3a4;
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        }

        .filter-group {
            margin-bottom: 25px;
        }

        .filter-group h4 {
            margin-bottom: 15px;
            color: #3e1f0e;
            font-size: 18px;
            font-weight: 600;
        }

        .filter-options {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
        }

        .filter-btn {
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid #f3c3a4;
    color: #3e1f0e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);

            padding: 10px 20px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            background: #fff3e5;
            color: #3e1f0e;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            font-weight: 500;
        }

        .filter-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
        }

        .filter-btn.active {
            background: linear-gradient(135deg, #ff8c42 0%, #f5515f 100%);
            border-color: transparent;
            box-shadow: 0 5px 15px rgba(255, 140, 66, 0.3);
        }

        .recipe-card {
            background: #fff3e5;
            backdrop-filter: blur(20px);
            border: 1px solid #f3c3a4;
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            animation: fadeIn 0.5s ease-out;
        }

        .recipe-card h3 {
            font-size: 26px;
            margin-bottom: 20px;
            color: #3e1f0e;
            font-weight: 700;
        }

        .recipe-card img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            border-radius: 15px;
            margin-bottom: 20px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
        }

        .nutrition-info {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            background: rgba(255, 140, 66, 0.1);
            border-radius: 15px;
            padding: 20px;
            margin: 20px 0;
            border: 1px solid rgba(255, 140, 66, 0.2);
        }

        .nutrition-item {
            text-align: center;
        }

        .nutrition-item span {
            display: block;
            font-size: 14px;
            color: #a88e7a;
            margin-bottom: 5px;
        }

        .nutrition-item strong {
            font-size: 20px;
            color: #3e1f0e;
            font-weight: 700;
        }

        .ingredients-list, .steps-list {
            background: rgba(255, 255, 255, 0.02);
            border-radius: 15px;
            padding: 25px;
            margin: 20px 0;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .ingredients-list h4, .steps-list h4 {
            margin-bottom: 15px;
            color: #3e1f0e;
            font-size: 20px;
            font-weight: 600;
        }

        .ingredients-list ul {
            list-style: none;
        }

        .ingredients-list li {
            padding: 10px 0;
            border-bottom: 1px solid #f3c3a4;
            color: #3e1f0e;
            font-size: 16px;
            display: flex;
            align-items: center;
        }

        .ingredients-list li::before {
            content: '•';
            color: #ff8c42;
            font-weight: bold;
            margin-right: 10px;
        }

        .steps-list ol {
            padding-left: 25px;
        }

        .steps-list li {
            padding: 12px 0;
            line-height: 1.6;
            color: #3e1f0e;
            font-size: 16px;
        }

        .action-buttons {
            display: flex;
            gap: 15px;
            margin-top: 25px;
        }

        .action-btn {
            flex: 1;
            padding: 15px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 15px;
            background: #fff3e5;
            color: #3e1f0e;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-weight: 500;
        }

        .action-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.4);
            transform: translateY(-2px);
        }

        .action-btn i {
            font-size: 18px;
        }

        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 248, 242, 0.9);
            z-index: 1000;
            visibility: hidden;
            opacity: 0;
            transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
        }

        .modal.is-open {
            visibility: visible;
            opacity: 1;
        }

        .modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            background: #fff2e0;
            backdrop-filter: blur(20px);
            border: 1px solid #f3c3a4;
            border-radius: 25px;
            padding: 40px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            opacity: 0;
            transition: opacity 0.25s ease-out, transform 0.25s ease-out;
        }

        .modal.is-open .modal-content {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
        }

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

        .modal-header h2 {
            font-size: 28px;
            color: #3e1f0e;
            font-weight: 700;
        }

        .close-btn {
            background: none;
            border: none;
            font-size: 30px;
            cursor: pointer;
            color: #a88e7a;
            transition: color 0.3s ease;
            padding: 5px;
        }

        .close-btn:hover {
            color: #3e1f0e;
        }

        .loading {
            display: none;
            text-align: center;
            padding: 60px;
            background: #fff3e5;
            backdrop-filter: blur(20px);
            border: 1px solid #f3c3a4;
            border-radius: 20px;
            margin: 20px 0;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 4px solid rgba(255, 140, 66, 0.2);
            border-top-color: #ff8c42;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 25px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

.loading p {
    color: #3e1f0e;
    font-size: 18px;
    font-weight: 500;
}

        .error-message {
            background: rgba(255, 59, 48, 0.1);
            border: 2px solid rgba(255, 59, 48, 0.3);
            border-radius: 15px;
            padding: 20px;
            margin: 20px 0;
            color: #ff6b6b;
            text-align: center;
            font-weight: 500;
        }

        .success-message {
            background: rgba(76, 175, 80, 0.1);
            border: 2px solid rgba(76, 175, 80, 0.3);
            border-radius: 15px;
            padding: 20px;
            margin: 20px 0;
            color: #4caf50;
            text-align: center;
            font-weight: 500;
        }

        .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
            text-align: center;
            padding: 40px 20px;
            color: #a88e7a;
        }

        .empty-state i {
            font-size: 50px;
            margin-bottom: 20px;
            color: rgba(255, 255, 255, 0.2);
        }

        .empty-state p {
            font-size: 16px;
            margin-top: 10px;
        }

        input[type="range"] {
            -webkit-appearance: none;
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            margin: 15px 0;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #ff8c42;
            cursor: pointer;
            box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
        }

        .range-labels {
            display: flex;
            justify-content: space-between;
            margin-top: -10px;
            font-size: 12px;
            color: #a88e7a;
        }


        /* Responsive design */
        @media (max-width: 768px) {
            .container {
                padding: 15px;
            }

            h1 {
                font-size: 24px;
            }

            .mode-grid {
                grid-template-columns: 1fr;
            }

            .nutrition-info {
                grid-template-columns: repeat(2, 1fr);
            }

            .filter-options {
                justify-content: center;
            }

            .action-buttons {
                flex-direction: column;
            }

        }

        /* Scrollbar styling */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(102, 126, 234, 0.5);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(102, 126, 234, 0.7);
        }

@media (max-width: 768px) {
    .filter-btn:not(.active) {
        border: 2px solid #c0895f !important;
        background: rgba(255, 255, 255, 0.85) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}