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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #1f2937;
    --accent: #059669;
    --success: #10b981;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-lighter: #f3f4f6;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

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

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
}

.header-ad {
    flex-shrink: 0;
}

/* Ad Demos */
.ad-demo {
    border-radius: 6px;
    overflow: hidden;
}

.header-ad-demo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.ad-label {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-content-demo {
    flex: 1;
    text-align: center;
}

.ad-text {
    font-size: 13px;
    font-weight: 600;
}

.ad-subtext {
    font-size: 11px;
    opacity: 0.9;
}

/* Sidebar Ad Demos */
.sidebar-ad-demo-left,
.sidebar-ad-demo-right {
    padding: 24px 20px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    position: relative;
}

.sidebar-ad-demo-left {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar-ad-demo-right {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.sidebar-ad-demo-left .ad-label,
.sidebar-ad-demo-right .ad-label {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 10px;
}

.ad-icon {
    font-size: 48px;
    margin: 16px 0;
    display: block;
}

.ad-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ad-description {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.4;
}

.ad-button {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ad-button:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

/* Banner Ad Demo */
.banner-ad-demo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.banner-ad-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.banner-ad-left {
    flex-shrink: 0;
}

.banner-ad-icon {
    font-size: 44px;
}

.banner-ad-middle {
    flex: 1;
}

.banner-ad-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.banner-ad-description {
    font-size: 13px;
    opacity: 0.95;
}

.banner-ad-right {
    flex-shrink: 0;
}

.banner-ad-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-ad-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.banner-ad-demo .ad-label {
    position: absolute;
    top: 12px;
    left: 30px;
    font-size: 10px;
}

/* Main Wrapper */
.main-wrapper {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    gap: 32px;
    padding: 40px 30px;
}

/* Sidebar */
.sidebar {
    flex-shrink: 0;
    width: 300px;
}

.left-sidebar {
    order: -1;
}

.sidebar-ad {
    position: sticky;
    top: 100px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.sidebar-ad:hover {
    box-shadow: var(--shadow-lg);
}

.sidebar-ad img {
    width: 100%;
    height: auto;
    display: block;
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
}

.container {
    width: 100%;
}

/* Card */
.card {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 28px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-primary);
}

textarea:hover {
    border-color: #d1d5db;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

textarea::placeholder {
    color: #9ca3af;
}

.btn-generate {
    width: 100%;
    padding: 14px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.btn-generate:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-generate:active {
    box-shadow: var(--shadow);
}

.qr-container {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.qr-code {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    padding: 32px;
    background: var(--bg-lighter);
    border-radius: 8px;
    border: 1px dashed var(--border);
}

.qr-code canvas {
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.qr-info {
    background: var(--bg-lighter);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    border-left: 3px solid var(--primary);
}

.qr-info strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 8px;
}

.button-group {
    display: flex;
    gap: 12px;
}

.btn-download,
.btn-reset {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-download {
    background: var(--success);
    color: white;
}

.btn-download:hover {
    background: #059669;
    box-shadow: var(--shadow-md);
}

.btn-reset {
    background: var(--bg-lighter);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-reset:hover {
    background: white;
    border-color: var(--text-secondary);
    box-shadow: var(--shadow-md);
}

/* Features Section */
.features-section {
    background: white;
    border-radius: 8px;
    padding: 48px 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.features-section h3 {
    font-size: 24px;
    margin-bottom: 36px;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature {
    text-align: center;
    padding: 28px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.feature:hover {
    background: white;
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 16px;
}

.feature h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.feature p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Bottom Banner */
.bottom-banner {
    width: 100%;
    margin-top: 32px;
    overflow: hidden;
    border-radius: 8px;
}

.bottom-banner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.bottom-banner:hover img {
    box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
    background: white;
    color: var(--text-secondary);
    text-align: center;
    padding: 28px 20px;
    margin-top: auto;
    font-size: 13px;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }

    .main-wrapper {
        gap: 24px;
        padding: 30px 20px;
    }

    .card {
        padding: 32px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .header-container {
        gap: 20px;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .sidebar {
        width: 100%;
        display: none;
    }

    .left-sidebar {
        display: none;
    }

    .right-sidebar {
        display: none;
    }

    .card {
        padding: 24px;
        margin-bottom: 20px;
    }

    .features-section {
        padding: 32px 24px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .header-ad {
        display: none;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo p {
        font-size: 12px;
    }

    .header-container {
        padding: 0 16px;
    }

    .banner-ad-content {
        flex-direction: column;
        gap: 16px;
    }

    .banner-ad-right {
        width: 100%;
    }

    .banner-ad-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 20px;
    }

    .features-section {
        padding: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .features-section h3 {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .logo h1 {
        font-size: 18px;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-download,
    .btn-reset {
        width: 100%;
    }

    textarea {
        min-height: 100px;
        font-size: 16px;
    }

    .header {
        padding: 16px 0;
    }

    .qr-code {
        padding: 20px;
    }

    .qr-info {
        padding: 12px;
    }

    .main-wrapper {
        padding: 16px;
    }
}
