* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.8;
    color: #1f2937;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    min-height: 100vh;
}

/* ===== Header Wrapper ===== */
header {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    justify-content:space-around;
    height: 58px;
    padding: 0 10px;
    border-bottom: 1px solid #e5e7eb;
    position: relative; /* for dropdown positioning */
}

/* Logo */
header img.logo {
    height: auto;
    width: 40%;
}

/* ===== Menu ===== */
.navbar .menu {
    list-style: none;
    display:flex;
    gap: 1.5rem;
}

.navbar .menu li a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar .menu li a:hover {
    color: #2563eb;
}

/* ===== Hamburger ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-left: 1rem;
}

.menu-toggle .hamburger {
    width: 25px;
    height: 3px;
    background: #1f2937;
    border-radius: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    /* Hide menu in row */
    .navbar .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%; /* directly under header */
        right: 1.5rem;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    /* Show menu when active */
    .navbar .menu.active {
        display: flex;
    }

    /* Show hamburger */
    .menu-toggle {
        display: flex;
    }
}

.app {
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* small fade-in for boxes when they appear */
.fade-in {
    animation: fadeIn 240ms ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-content {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}



.app h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}



.subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.7;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

/* File Upload Styles */
.file-upload {
    width: 100%;
    max-width: 42rem;
}

.upload-area {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
}

.upload-area:hover {
    border-color: #9ca3af;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.upload-area.drag-active {
    border-color: #3b82f6;
    background: #dbeafe;
    transform: scale(1.02);
}

.upload-area.processing {
    opacity: 0.5;
    pointer-events: none;
}

.upload-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.upload-area.drag-active .upload-icon {
    background: #dbeafe;
}

.upload-icon svg {
    width: 2rem;
    height: 2rem;
    color: #6b7280;
}

.upload-area.drag-active .upload-icon svg {
    color: #3b82f6;
}

.upload-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.upload-description {
    color: #6b7280;
    margin-bottom: 1rem;
}

.upload-formats {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Error Message */
.error-message {
    width: 100%;
    max-width: 42rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #ef4444;
    flex-shrink: 0;
}

.error-message p {
    color: #b91c1c;
    font-size: 0.875rem;
}

/* Image Preview */
.image-preview {
    width: 100%;
    max-width: 42rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.preview-container {
    position: relative;
}

.preview-container img {
    width: 100%;
    height: auto;
    max-height: 24rem;
    object-fit: contain;
    background: #f9fafb;
    display: block;
}

.remove-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    border-radius: 50%;
    padding: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-button:hover {
    background: #f9fafb;
    transform: scale(1.05);
}

.remove-button svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #6b7280;
}

.file-info {
    padding: 1rem;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6b7280;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Processing Status */
.processing-status {
    width: 100%;
    max-width: 42rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.processing-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.processing-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto;
    background: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 2rem;
    height: 2rem;
    color: #2563eb;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.processing-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.processing-text p {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.progress-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.progress-header span:first-child {
    color: #6b7280;
}

.progress-header span:last-child {
    font-weight: 500;
    color: #1f2937;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 9999px;
    transition: width 0.3s ease;
    width: 0%;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.zap-icon {
    width: 1rem;
    height: 1rem;
}

/* Text Output */
.text-output {
    width: 100%;
    max-width: 42rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.output-header {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.output-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.text-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #2563eb;
}

.output-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.confidence {
    font-size: 0.875rem;
    color: #6b7280;
}

.output-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn svg {
    width: 1rem;
    height: 1rem;
}

.btn-primary {
    color: white;
    background: #2563eb;
    border-color: transparent;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    color: #374151;
    background: white;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.textarea-container {
    padding: 1rem;
}

.textarea-container textarea {
    width: 100%;
    height: 16rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    color: #1f2937;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

.textarea-container textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.textarea-container textarea::placeholder {
    color: #9ca3af;
}

/* note */
.note {
    margin-top: 4rem;
    text-align: center;
}

.note-content {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.note-content .highlight {
    font-weight: 600;
    color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app {
        padding: 1rem 0.5rem;
    }

    .app h1 {
        font-size: 2rem;
    }

    .header-content {
        flex-wrap: wrap;
        justify-content: center;
    }

    .subtitle {
        font-size: 1.125rem;
    }

    .upload-area {
        padding: 1.5rem;
    }

    .output-header {
        flex-direction: column;
        align-items: stretch;
    }

    .output-actions {
        justify-content: center;
    }

    .textarea-container textarea {
        height: 12rem;
    }
    .note-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
}

@media (max-width: 480px) {
    .app h1 {
        font-size: 1.75rem;
    }

    

    .upload-area {
        padding: 1rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
}

    
    article{ padding: 20px;}
    
    h2{ font-size:1.25rem; margin-top:1.25rem; color:#0b1220; }
    p{ margin: .6rem 0; color:#334155; }
    .lead { font-size:1.05rem; color:#0f172a; }
    ul{ margin: .5rem 0 1rem 1.25rem; }
    
    .feature{ border:1px solid #e6e9ee; padding: .75rem; border-radius:8px; background:#fbfdff; }
    .cta { display:inline-block; margin-top:1rem; background:#2563eb; color:#fff; padding:.65rem 1rem; border-radius:8px; text-decoration:none; }
    
    .small { font-size:.9rem; color:#64748b; }
    blockquote{ border-left:4px solid #e2e8f0; padding-left:1rem; color:#334155; background:#fafbff; margin:1rem 0; border-radius:6px;}
    table{ width:100%; border-collapse:collapse; margin:1rem 0; }
    th,td{ border:1px solid #e6e9ee; padding:.6rem; text-align:left; }
    .faq dt{ font-weight:700; margin-top:1rem; }
    .meta { font-size:.9rem; color:#475569; margin-top: .25rem; }
    
    .grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.blogs {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: box-shadow 0.3s ease;
    cursor: pointer;
}
.blogs:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.blogs img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

    /* Footer Menu Styles */
.footer-menu {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 1rem 0;
    font-size: 0.875rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li a {
    color: #f3f4f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links li a:hover {
    color: #3b82f6;
}

footer p {
    color: #f3f4f6;
    text-align: center;
    margin-top: 60px;
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}
