:root {
    --primary-color: #f9d949; /* Yellow from the reference image */
    --secondary-color: #f45d01; /* Orange from the reference image */
    --background-light: #fff9e6; /* Light yellow background */
    --background-grid: #fffbe6; /* Grid background from reference */
    --button-border: #e6c229; /* Darker yellow for button borders */
    --text-color: #333;
    --light-text: #fff;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --hover-transform: translateY(-2px);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-grid);
    background-image: linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 20px 20px;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (max-width: 768px) {
    .header {
        padding-left: 60px; /* Make room for hamburger menu */
    }
}

.sidebar {
    background-color: var(--background-light);
    min-height: calc(100vh - 64px);
    border-right: 1px solid #e0e0e0;
    padding-top: 1.5rem;
    position: sticky;
    top: 64px;
    z-index: 90;
    height: calc(100vh - 64px);
    overflow-y: auto;
    transition: transform 0.3s ease;
}

/* Hamburger Menu - reliable implementation */
.menu-btn {
    position: absolute;
    display: none;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 999;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 10px;
}

.menu-btn__burger {
    width: 30px;
    height: 3px;
    background: #333;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease-in-out;
}

.menu-btn__burger::before,
.menu-btn__burger::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background: #333;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease-in-out;
}

.menu-btn__burger::before {
    transform: translateY(-10px);
}

.menu-btn__burger::after {
    transform: translateY(10px);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 250px;
        height: 100vh;
        z-index: 150;
        background-color: var(--background-light);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .menu-btn {
        display: flex !important; /* Force display on mobile */
        position: fixed !important; /* Fixed position to ensure visibility */
        top: 10px !important;
        left: 10px !important;
        z-index: 9999 !important; /* Ensure it's above everything */
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 1rem !important;
        width: 100% !important;
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 140;
    }
    
    .overlay.active {
        display: block;
    }
    
    /* Improve mobile experience for other components */
    .examples-grid {
        grid-template-columns: 1fr !important;
    }
    
    .examples-container {
        padding: 1rem !important;
    }
    
    .modal-content {
        width: 95% !important;
        max-height: 80vh !important;
    }
    
    /* Improve form elements on mobile */
    input, select, textarea, button {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    /* Animate hamburger icon when sidebar is open */
    .sidebar.open ~ .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .sidebar.open ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }
    
    .sidebar.open ~ .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

.sidebar-item {
    padding: 0.75rem 1rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-item:hover, .sidebar-item.active {
    background-color: rgba(244, 93, 1, 0.1);
    border-left-color: var(--secondary-color);
}

.sidebar-item.active {
    font-weight: bold;
}

.main-content {
    padding: 1.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: 2px solid var(--button-border);
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--box-shadow);
}

.btn-primary:hover {
    background-color: var(--button-border);
    transform: var(--hover-transform);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--box-shadow);
}

.btn-secondary:hover {
    background-color: #d95204;
    transform: var(--hover-transform);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

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

.form-control {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(249, 217, 73, 0.25);
    outline: none;
}

.output-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: var(--box-shadow);
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.output-container:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--secondary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.feedback-btn {
    transition: all 0.2s ease;
}

.feedback-btn:hover {
    transform: scale(1.1);
}

.feedback-btn.active {
    color: var(--secondary-color);
}

/* Numbered items styling */
.numbered-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.numbered-item:hover {
    transform: translateX(5px);
    cursor: pointer;
}

.number-circle {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: 2px solid var(--button-border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.item-content {
    background-color: rgba(249, 217, 73, 0.2);
    border: 1px solid var(--button-border);
    border-radius: 30px;
    padding: 0.75rem 1.5rem;
    flex-grow: 1;
    position: relative;
    transition: all 0.3s ease;
}

.item-content.active {
    background-color: rgba(249, 217, 73, 0.5);
    font-weight: 600;
}

.item-content::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to left, var(--primary-color), transparent);
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
    opacity: 0.3;
}

/* Analysis section styling */
.analysis-section {
    background-color: rgba(244, 93, 1, 0.05);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Intent section styling */
.intent-section {
    margin-bottom: 8px;
}

.intent-section strong {
    color: #2563eb; /* Blue color for intent */
    font-weight: 600;
    margin-right: 8px;
}

.intent-badge {
    background-color: #dbeafe; /* Light blue background */
    color: #1e40af; /* Darker blue text */
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-block;
}

/* Complexity section styling */
.complexity-section {
    margin-bottom: 8px;
}

.complexity-section strong {
    color: #7c3aed; /* Purple color for complexity */
    font-weight: 600;
    margin-right: 8px;
}

.complexity-badge {
    background-color: #ede9fe; /* Light purple background */
    color: #5b21b6; /* Darker purple text */
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-block;
}

/* Web search section styling */
.web-search-section {
    margin-bottom: 8px;
}

.web-search-section strong {
    color: #059669; /* Green color for web search */
    font-weight: 600;
    margin-right: 8px;
}

.web-search-badge {
    background-color: #d1fae5; /* Light green background */
    color: #047857; /* Darker green text */
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-block;
}

.web-search-results {
    margin-top: 4px;
    padding-left: 8px;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Keywords section styling */
.keywords-section {
    background-color: rgba(244, 93, 1, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.keywords-section strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.highlighted-keywords {
    display: inline;
    line-height: 1.6;
    word-break: break-word;
}

.keyword-highlight {
    background-color: var(--secondary-color);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
    margin: 0 1px;
    display: inline-block;
}

.success-message {
    padding: 8px 0;
    color: #2c7a2c;
    font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}

/* Examples component styling */
.example-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
    background-color: white;
    padding: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.example-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.example-item img, .example-item video {
    width: 100%;
    border-radius: 0.5rem;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.example-item img:hover, .example-item video:hover {
    opacity: 0.9;
}

.example-item img {
    height: 200px;
}

.example-item video {
    max-height: 300px;
    background-color: #000;
}

/* Modal styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 2rem;
    backdrop-filter: blur(5px);
}

/* About page styling */
.feature-icon {
    font-size: 2rem;
    display: inline-block;
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.process-step {
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateX(5px);
}

.step-number {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.process-step:hover .step-number {
    transform: scale(1.1);
    background-color: var(--secondary-color);
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-media {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-caption {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
    color: #333;
    background-color: white;
    width: 100%;
}
