/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #FF006E, #8338EC, #3A86FF);
    --dark-bg: #0a0a0a;
    --dark-surface: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #888;
    --accent-blue: #3A86FF;
    --accent-purple: #8338EC;
    --accent-pink: #FF006E;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* Background Animation */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, var(--accent-pink) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, var(--accent-purple) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, var(--accent-blue) 0%, transparent 50%);
    animation: gradientShift 20s ease infinite;
    opacity: 0.15;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(120deg); }
    66% { transform: translate(20px, -10px) rotate(240deg); }
}

/* Header */
header {
    padding: 6rem 2rem 2rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Content Sections */
.content-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.content-container {
    background: var(--dark-surface);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(58, 134, 255, 0.2);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Controls Panel */
.controls {
    background: var(--dark-surface);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ddd;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(58, 134, 255, 0.3);
}

/* Color Picker */
.color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.color-input-wrapper {
    display: flex;
    flex-direction: column;
}

.color-label {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

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

.color-text {
    flex: 1;
    padding: 0.75rem;
    font-family: monospace;
    text-transform: uppercase;
}

.color-input {
    width: 50px;
    height: 50px;
    padding: 0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: none;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.color-input:hover::-webkit-color-swatch {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

/* Logo Upload */
.logo-upload {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.logo-upload:hover {
    border-color: var(--accent-blue);
    background: rgba(58, 134, 255, 0.05);
}

.logo-upload.drag-over {
    border-color: var(--accent-pink);
    background: rgba(255, 0, 110, 0.1);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-text {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.logo-preview-container {
    position: relative;
    display: inline-block;
}

.logo-preview {
    max-width: 150px;
    max-height: 150px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.remove-logo {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--accent-pink);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
}

.remove-logo:hover {
    transform: scale(1.1);
    background: #ff3366;
}

.remove-logo span {
    margin-top: -2px;
}

/* Style Selector */
.style-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.style-option {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.style-option:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.style-option.active {
    border-color: var(--accent-blue);
    background: rgba(58, 134, 255, 0.1);
    box-shadow: 0 0 20px rgba(58, 134, 255, 0.3);
}

.style-preview {
    width: 40px;
    height: 40px;
    background: var(--text-primary);
}

.style-preview.square {
    border-radius: 5px;
}

.style-preview.dots {
    border-radius: 50%;
}

.style-preview.rounded {
    border-radius: 15px;
}

/* Preview Panel */
.preview-panel {
    background: var(--dark-surface);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.qr-container {
    display: inline-block;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 1.5rem 0;
}

#qrcode {
    display: block;
    line-height: 0;
}

#qrcode canvas,
#qrcode img {
    display: block !important;
    max-width: 100%;
    height: auto;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 10px;
}

.tab-button {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 0.9rem;
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--primary-gradient);
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
}

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

/* vCard Form */
.vcard-form,
.wifi-form,
.sms-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.vcard-form .control-group,
.wifi-form .control-group,
.sms-form .control-group {
    margin-bottom: 0;
}

.vcard-form input,
.wifi-form input,
.wifi-form select,
.sms-form input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.vcard-form input:focus,
.wifi-form input:focus,
.wifi-form select:focus,
.sms-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(58, 134, 255, 0.3);
}

/* Character Counter */
.character-count {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.character-count.warning {
    color: var(--accent-pink);
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1 1 45%;
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-blue);
}

.checkbox-group label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

/* Download Options */
.download-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.download-btn {
    padding: 1rem;
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(131, 56, 236, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Info Section */
.info-section {
    background: rgba(255, 255, 255, 0.02);
    padding: 4rem 0;
    margin-top: 4rem;
}

.info-section .content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.steps-list {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.steps-list li {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.use-cases {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.use-cases li {
    padding: 1rem;
    background: var(--dark-surface);
    border-radius: 10px;
    border-left: 3px solid var(--accent-blue);
}

/* Footer */
.main-footer {
    background: rgba(0, 0, 0, 0.5);
    margin-top: 4rem;
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--dark-bg);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .nav-links.active {
        display: block;
    }
    
    .nav-links li {
        display: block;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(58, 134, 255, 0.1);
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .color-controls {
        grid-template-columns: 1fr;
    }
    
    .download-options {
        grid-template-columns: 1fr;
    }
    
    .style-selector {
        grid-template-columns: repeat(3, 1fr);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .controls, .preview-panel {
        padding: 1rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 1s ease-in-out infinite;
}

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

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-surface);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    z-index: 9999;
    animation: slideUp 0.3s ease-out;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-content p {
    flex: 1;
    margin: 0;
    color: var(--text-primary);
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cookie-accept {
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(131, 56, 236, 0.4);
}

.cookie-link {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.cookie-link:hover {
    color: var(--accent-purple);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}