/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fafbfc;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Navigation */
.navbar {
    background: #032157;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(3, 33, 87, 0.3);
}

.nav-links a {
    color: #e6ffff;
    margin-right: 1.5rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #19ddf3;
    text-decoration: underline;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-auth .nav-guest {
    color: #e6ffff;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-auth .nav-guest:hover {
    color: #19ddf3;
    text-decoration: underline;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name-link {
    color: #e6ffff;
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(25, 221, 243, 0.15);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    transition: background 0.2s;
}

.user-name-link:hover {
    background: rgba(25, 221, 243, 0.3);
    text-decoration: none;
}

.nav-logout {
    color: rgba(230, 255, 255, 0.7);
    font-size: 0.85rem;
    transition: color 0.2s;
}

.nav-logout:hover {
    color: #19ddf3;
    text-decoration: underline;
}

/* Header */
.header {
    background: #ffffff;
    text-align: center;
    padding: 2rem 1rem 1.5rem;
}

.logo-img {
    max-width: 400px;
    width: 100%;
    height: auto;
}

.logo {
    font-family: 'Georgia', serif;
    font-size: 4rem;
    color: #032157;
    text-shadow: 3px 3px 6px rgba(3, 33, 87, 0.1);
    font-style: italic;
    letter-spacing: 2px;
}

.tagline {
    color: #032157;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* Generator Section */
.generator-section {
    padding: 2rem 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.generator-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Tabs */
.tabs {
    display: flex;
    background: #f0f4f8;
    border-bottom: 2px solid #b2ebf2;
}

.tab {
    flex: 1;
    padding: 1rem 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.tab:hover {
    background: #d4f7fa;
    color: #032157;
}

.tab.active {
    background: white;
    color: #032157;
    font-weight: 600;
    border-bottom: 3px solid #19ddf3;
}

.tab-icon {
    font-size: 1.3rem;
}

/* Generator Body */
.generator-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .generator-body {
        grid-template-columns: 1fr;
    }
}

/* Input Panel */
.input-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
}

.tab-content.active {
    display: flex;
}

.tab-content label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
}

.tab-content input[type="url"],
.tab-content input[type="email"],
.tab-content input[type="text"],
.tab-content textarea,
.tab-content select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #e0e7ef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.tab-content input:focus,
.tab-content textarea:focus,
.tab-content select:focus {
    outline: none;
    border-color: #19ddf3;
}

.hint {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* Redirect option */
.redirect-option {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #e6ffff;
    border: 1px solid #b2ebf2;
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #032157;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.redirect-result {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
}

.redirect-result .redirect-url {
    font-family: monospace;
    font-size: 0.9rem;
    color: #2e7d32;
    word-break: break-all;
    font-weight: 600;
}

.redirect-result p {
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.3rem;
}

/* Autocomplete suggestions */
.autocomplete-wrapper {
    position: relative;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #19ddf3;
    border-top: none;
    border-radius: 0 0 8px 8px;
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: 0 4px 12px rgba(3, 33, 87, 0.1);
}

.suggestions-list.visible {
    display: block;
}

.suggestions-list li {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.suggestions-list li:hover,
.suggestions-list li.active {
    background: #e6ffff;
}

.suggestions-list .nominatim-credit {
    font-size: 0.7rem;
    color: #aaa;
    text-align: right;
    padding: 0.3rem 0.8rem;
    cursor: default;
}

.suggestions-list .nominatim-credit:hover {
    background: none;
}

/* Customization */
.customization {
    border-top: 1px solid #e0e7ef;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.customization h3 {
    font-size: 1rem;
    color: #444;
    margin-bottom: 0.75rem;
}

.color-options {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.color-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-field label {
    font-size: 0.85rem;
    color: #555;
}

.color-field input[type="color"] {
    width: 40px;
    height: 35px;
    border: 2px solid #e0e7ef;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.size-option {
    margin-bottom: 0.75rem;
}

.size-option label {
    font-size: 0.85rem;
    color: #555;
    margin-right: 0.5rem;
}

.size-option select {
    padding: 0.4rem 0.8rem;
    border: 2px solid #e0e7ef;
    border-radius: 6px;
    font-size: 0.85rem;
}

.image-option {
    margin-bottom: 0.5rem;
}

.image-option label {
    font-size: 0.85rem;
    color: #555;
    display: block;
    margin-bottom: 0.3rem;
}

.image-option input[type="file"] {
    font-size: 0.85rem;
}

/* Generate Button */
.btn-generate {
    background: #032157;
    color: #e6ffff;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

.btn-generate:hover {
    background: #0a3a7e;
    transform: translateY(-1px);
}

.btn-generate:active {
    transform: translateY(0);
}

/* Output Panel */
.output-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.qr-display {
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    border: 2px dashed #d0d7e0;
    border-radius: 12px;
    padding: 1.5rem;
}

.qr-display canvas {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.placeholder-text {
    color: #aaa;
    font-size: 1rem;
    text-align: center;
}

/* Download Buttons */
.download-options {
    display: flex;
    gap: 1rem;
}

.save-dynamic-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.save-dynamic-hint {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.btn-save-dynamic {
    background: #43a047;
    width: 100%;
}

.btn-save-dynamic:hover {
    background: #2e7d32;
}

.btn-download {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #19ddf3;
    color: #032157;
}

.btn-download:hover {
    background: #0fc4d8;
}

.btn-download.btn-secondary {
    background: white;
    color: #032157;
    border: 2px solid #19ddf3;
}

.btn-download.btn-secondary:hover {
    background: #e6ffff;
}

/* Features Section */
.features-section {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.feature-banner {
    background: #032157;
    color: #e6ffff;
    padding: 1.25rem 2rem;
    border-radius: 8px 8px 0 0;
    text-align: center;
    margin-top: 2rem;
}

.feature-banner h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.feature-banner.feature-images {
    background: linear-gradient(135deg, #032157, #19ddf3);
}

.feature-banner.feature-maps {
    background: linear-gradient(135deg, #0a3a7e, #19ddf3);
}

.feature-banner.feature-wifi {
    background: linear-gradient(135deg, #032157, #0fc4d8);
}

.feature-banner.feature-dinamyc_QR {
    background: linear-gradient(135deg, #0a3a7e, #0fc4d8);
}

.feature-banner.feature-registered {
    background: linear-gradient(135deg, #032157, #19ddf3);
}

.feature-banner.feature-paid {
    background: linear-gradient(135deg, #4a148c, #ce93d8);
}

.feature-badge {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #032157;
    background: #e6ffff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.feature-examples {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.feature-examples canvas {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}


.feature-content {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
}

.feature-content.feature-with-image {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.feature-image {
    width: 150px;
    height: auto;
    flex-shrink: 0;
    border-radius: 4px;
}

.feature-content p {
    margin-bottom: 0.5rem;
    color: #555;
}

/* Footer */
.footer {
    background: #032157;
    color: rgba(230, 255, 255, 0.8);
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
}

.footer a {
    color: #19ddf3;
    font-weight: 600;
}

/* Corner colors option */
.corner-colors-option {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e0e7ef;
    border-radius: 8px;
}

.corner-colors {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* Finder shape option */
.finder-shape-option {
    margin-top: 0.75rem;
}

.finder-shape-choices {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.finder-shape-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid #e0e7ef;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    color: #333;
}

.finder-shape-choice:hover {
    border-color: #19ddf3;
    background: #f0fafa;
}

.finder-shape-choice.selected {
    border-color: #032157;
    background: #e6ffff;
}

.finder-shape-choice input[type="radio"] {
    display: none;
}

/* Center image option */
.center-image-option,
.watermark-option {
    margin-top: 0.75rem;
}

.center-image-option label,
.watermark-option label {
    font-size: 0.85rem;
    color: #555;
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.center-image-option input[type="file"],
.watermark-option input[type="file"] {
    font-size: 0.85rem;
}

/* Share section */
.share-section {
    width: 100%;
    text-align: center;
}

.share-title {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.share-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
    color: white;
}

.share-btn:hover {
    transform: scale(1.15);
    opacity: 0.9;
}

.share-whatsapp { background: #25D366; }
.share-facebook { background: #1877F2; }
.share-x { background: #000000; }
.share-linkedin { background: #0A66C2; }
.share-telegram { background: #26A5E4; }
.share-messenger { background: #0084FF; }
.share-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.share-threads { background: #000000; }
.share-tiktok { background: #000000; }
.share-email { background: #032157; }

/* Responsive */
@media (max-width: 600px) {
    .logo {
        font-size: 2.8rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1 1 33%;
    }

    .color-options {
        flex-direction: column;
        gap: 0.75rem;
    }

    .download-options {
        flex-direction: column;
        width: 100%;
    }

    .btn-download {
        width: 100%;
        text-align: center;
    }
}
