﻿/* ========================================
   LAYOUT - Modern Clean Structure
   ======================================== */

/* Main Container */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    overflow: hidden;
    animation: containerIn 0.5s var(--ease-out);
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: var(--color-white);
    padding: var(--space-8) var(--space-8);
    text-align: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    backdrop-filter: blur(8px);
}

.header-icon svg {
    width: 28px;
    height: 28px;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
    letter-spacing: -0.5px;
}

.header p {
    font-size: 0.9375rem;
    opacity: 0.85;
    font-weight: 400;
}

/* Main Content - Flexbox layout for smooth animation */
.main-content {
    padding: var(--space-8);
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-8);
    align-items: flex-start;
}

/* Form Section */
.form-section {
    flex: 1 1 100%;
    min-width: 0;
    margin-bottom: 0;
}

.main-content.has-qr .form-section {
    flex: 1 1 50%;
}

/* Result Section */
.result-section {
    display: none;
}

.result-section.visible {
    display: block;
    flex: 1 1 50%;
    min-width: 0;
    animation: slideIn 0.4s var(--ease-out) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--space-10) var(--space-6);
    color: rgba(255, 255, 255, 0.75);
}

.footer-inner {
    max-width: 400px;
    margin: 0 auto;
}

.footer-author {
    font-size: 0.875rem;
    margin-bottom: var(--space-5);
    font-weight: 400;
}

.footer-author strong {
    color: var(--color-white);
    font-weight: 600;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Footer Copyright */
.footer-copyright {
    font-size: 0.75rem;
    opacity: 0.5;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet and below - single column */
@media (max-width: 768px) {
    .main-content {
        flex-wrap: wrap;
    }

    .form-section {
        flex: 1 1 100%;
    }

    .result-section.visible {
        flex: 1 1 100%;
    }

    .main-content {
        gap: var(--space-6);
    }
}

@media (max-width: 640px) {
    body {
        padding: var(--space-4);
    }

    .container {
        border-radius: var(--radius-lg);
    }

    .header {
        padding: var(--space-6) var(--space-6);
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .main-content {
        padding: var(--space-6);
    }

    .qr-display {
        padding: var(--space-6);
    }

    .download-section {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
    }
}

@media (max-width: 400px) {
    body {
        padding: var(--space-3);
    }

    .header {
        padding: var(--space-5) var(--space-4);
    }

    .main-content {
        padding: var(--space-4);
    }

    .file-input-container {
        padding: var(--space-6) var(--space-4);
    }
}