/* Reset and Base Styles */
* {
    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.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.header-text {
    text-align: left;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .header-text {
        text-align: center;
    }

    header h1 {
        font-size: 2rem;
    }

    .header-logo {
        width: 60px;
        height: 60px;
    }
}

/* Ad Containers */
.ad-container {
    display: flex;
    justify-content: center;
    margin: 10px auto;
    max-width: 1200px;
    padding: 0 20px;
    width: 100%;
    min-height: 0;
}

/* AdSense ad styling */
.ad-top .adsbygoogle,
.ad-bottom .adsbygoogle {
    display: inline-block;
    width: 728px;
    max-width: 100%;
    height: 90px;
}

.ad-inline {
    margin: 30px auto;
    max-width: 336px;
    text-align: center;
}

.ad-inline .adsbygoogle {
    display: block;
    width: 100%;
    max-width: 336px;
    min-height: 280px;
    margin: 0 auto;
}

/* Content Wrapper with Sidebars */
.content-wrapper {
    display: grid !important;
    grid-template-columns: 180px 1fr 180px !important;
    gap: 20px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
    align-items: start !important;
}

.sidebar-left,
.sidebar-right {
    position: sticky !important;
    top: 20px !important;
}

/* Main Generator Section */
.generator-section {
    flex: 1 !important;
}

/* Card */
.card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

input[type="url"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="url"]:focus {
    outline: none;
    border-color: #667eea;
}

/* Options */
.options {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.option-group {
    flex: 1;
}

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* Logo Upload Section */
.logo-section {
    margin: 25px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #e0e0e0;
}

.logo-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.logo-input {
    display: none;
}

.logo-upload-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.logo-upload-label:hover {
    border-color: #667eea;
    background: #f5f5ff;
}

.upload-icon {
    font-size: 1.5rem;
}

#logoFileName {
    color: #666;
    font-size: 0.95rem;
}

.btn-clear-logo {
    padding: 12px 20px;
    background: #ff5252;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-clear-logo:hover {
    background: #ff1744;
    transform: translateY(-2px);
}

.logo-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #777;
    font-style: italic;
}

.logo-preview {
    margin-top: 15px;
    text-align: center;
}

.logo-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 5px;
    background: white;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #4CAF50;
    color: white;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

/* Result Section */
.result-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.result-section h3 {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.5rem;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.qr-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #c62828;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Features Section */
.features {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.features h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.feature-item h3 {
    margin-bottom: 10px;
    color: #555;
    font-size: 1.3rem;
}

.feature-item p {
    color: #777;
    line-height: 1.5;
}

/* SEO Content Section */
.seo-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-top: 40px;
}

.seo-content h2 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 20px;
}

.seo-content h3 {
    color: #555;
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.seo-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1rem;
}

.seo-content ul,
.seo-content ol {
    margin: 20px 0;
    padding-left: 30px;
    color: #666;
}

.seo-content li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.seo-content strong {
    color: #333;
}

/* FAQ Section */
.faq-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-top: 40px;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    font-size: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.faq-item {
    padding: 25px;
    background: #f9f9f9;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.faq-item h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: white;
    margin-top: 40px;
}

footer a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr !important;
    }

    .sidebar-left,
    .sidebar-right {
        display: none !important;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card {
        padding: 25px;
    }

    .features {
        padding: 25px;
    }

    .options {
        flex-direction: column;
    }

    .ad-top .adsbygoogle,
    .ad-bottom .adsbygoogle {
        max-width: 100%;
        min-height: 60px;
    }

    .ad-inline {
        max-width: 100%;
    }

    .ad-inline .adsbygoogle {
        max-width: 100%;
    }
}
