/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8faf9;
    color: #1a3a2e;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 32px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a3a2e;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #4a6d5f;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #2d6a4f;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #2d6a4f;
}

.logout-btn {
    background-color: #52b788;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #40916c;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #2d6a4f;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===== RESPONSIVE NAVBAR ===== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        display: none;
        gap: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-brand h1 {
        font-size: 1.2rem;
    }
}

/* ===== MAIN CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.5rem;
    color: #1a3a2e;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: #4a6d5f;
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===== INFO GRID (CARDS) ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.card {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(45, 106, 79, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h4 {
    font-size: 1.3rem;
    color: #1a3a2e;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.card-content p {
    color: #4a6d5f;
    line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    background-color: #ffffff;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 3rem 0;
}

.how-it-works h3 {
    text-align: center;
    font-size: 2rem;
    color: #1a3a2e;
    margin-bottom: 1rem;
    font-weight: 700;
}

.how-description {
    text-align: center;
    color: #4a6d5f;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
}

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

.step-content h4 {
    color: #2d6a4f;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.step-content p {
    color: #4a6d5f;
    font-size: 0.95rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    text-align: center;
    margin: 3rem 0;
}

/* ===== BUTTONS ===== */
.btn {
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background-color: #52b788;
    color: white;
}

.btn-primary:hover {
    background-color: #40916c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 183, 136, 0.3);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.btn-danger {
    background-color: #ef476f;
    color: white;
}

.btn-danger:hover {
    background-color: #d62828;
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.upload-box {
    background-color: #ffffff;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.upload-box h3 {
    font-size: 1.8rem;
    color: #1a3a2e;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.upload-box > p {
    color: #4a6d5f;
    margin-bottom: 2rem;
}

.file-input-wrapper {
    margin: 2rem 0;
}

#fileInput {
    display: none;
}

.file-label {
    display: inline-block;
    background-color: #f0f7f4;
    border: 2px dashed #52b788;
    padding: 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background-color: #e8f5f0;
    border-color: #40916c;
}

.file-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.file-text {
    color: #2d6a4f;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ===== SPINNER ===== */
.spinner {
    display: none;
    margin: 2rem auto;
    text-align: center;
}

.spinner-circle {
    margin: 0 auto 1rem;
    border: 4px solid #e8f5f0;
    border-top: 4px solid #52b788;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

.spinner p {
    color: #4a6d5f;
    font-weight: 500;
}

/* ===== RESULT ===== */
.result {
    margin-top: 2rem;
}

.result img {
    max-width: 400px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.result p {
    font-size: 1.2rem;
    color: #1a3a2e;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ===== HISTORY ===== */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-header h3 {
    font-size: 2rem;
    color: #1a3a2e;
    font-weight: 700;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.history-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.history-item:hover {
    transform: translateY(-4px);
}

.history-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.history-item p {
    color: #1a3a2e;
    font-weight: 600;
    margin: 0.5rem 0;
}

.history-item small {
    color: #4a6d5f;
    font-size: 0.85rem;
}

/* ===== CONTACT ===== */
.contact-section {
    max-width: 600px;
    margin: 0 auto;
}

.contact-section h3 {
    text-align: center;
    font-size: 2rem;
    color: #1a3a2e;
    margin-bottom: 2rem;
    font-weight: 700;
}

.contact-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid #e8f5f0;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    font-size: 2rem;
}

.contact-item h4 {
    color: #2d6a4f;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.contact-item p {
    color: #4a6d5f;
    font-weight: 500;
}

/* ===== FOOTER ===== */
footer {
    background-color: #ffffff;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

footer p {
    color: #4a6d5f;
    font-size: 0.95rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .upload-box {
        padding: 2rem 1.5rem;
    }
    
    .how-it-works {
        padding: 2rem 1.5rem;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
}