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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #fff5eb 0%, #ffe8d1 100%);
    height: 100vh;
    color: #333;
    overflow: hidden;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0.8rem 2rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.github-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #ff8c42;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: #ff8c42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.github-link:hover svg {
    fill: white;
}

.github-link svg {
    width: 24px;
    height: 24px;
    fill: #ff8c42;
    transition: fill 0.3s ease;
}

.about-btn {
    background: white;
    border: 2px solid #ff8c42;
    color: #ff8c42;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-btn:hover {
    background: #ff8c42;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
}

.hero-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero-section h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.hero-section p {
    font-size: 1rem;
    color: #718096;
}

/* Upload Section */
.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    flex: 1;
    max-height: calc(100% - 4rem);
    overflow: auto;
}

.upload-area {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.drop-zone {
    border: 3px dashed #ffc09f;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff9f5;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    max-height: 50vh;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: #ff8c42;
    background: #fff5eb;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-zone-content.hidden {
    display: none;
}

.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.drop-zone-text {
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.drop-zone-subtext {
    color: #a0aec0;
    font-size: 0.9rem;
}

.drop-zone-preview {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.drop-zone-preview.show {
    display: flex;
}

.drop-zone-preview img {
    max-width: 100%;
    max-height: 40vh;
    object-fit: contain;
    border-radius: 8px;
}

#imageInput {
    display: none;
}

.analyze-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Preview Section */
.preview-area {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-height: 50vh;
}

.preview-placeholder {
    text-align: center;
    color: #a0aec0;
}

.preview-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#preview {
    max-width: 100%;
    max-height: 40vh;
    border-radius: 8px;
    display: none;
    object-fit: contain;
}

#preview.show {
    display: block;
}

/* Status Message */
#status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    text-align: center;
    font-weight: 500;
}

#status.show {
    display: block;
}

#status.loading {
    background: #fff3cd;
    color: #856404;
}

#status.error {
    background: #f8d7da;
    color: #721c24;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: #a0aec0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.modal-content h3 {
    color: #ff8c42;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.modal-content p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.modal-content ul {
    list-style: none;
    padding: 0;
}

.modal-content ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.modal-content ul li:last-child {
    border-bottom: none;
}

.contact-email {
    color: #ff8c42;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email:hover {
    color: #ff6b35;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    main {
        height: auto;
        min-height: 100vh;
    }

    .header-content {
        padding: 0;
    }

    .company-name {
        font-size: 1.2rem;
    }

    .about-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section p {
        font-size: 0.9rem;
    }

    .upload-container {
        grid-template-columns: 1fr;
        max-height: none;
        overflow: visible;
    }

    .drop-zone {
        padding: 1rem;
        max-height: 40vh;
    }

    .drop-zone-preview img {
        max-height: 30vh;
    }

    .preview-area {
        max-height: 40vh;
    }

    #preview {
        max-height: 30vh;
    }

    .modal-content {
        padding: 2rem;
    }

    header {
        padding: 1rem;
    }

    main {
        padding: 1rem;
    }
}