/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #e8d5f2 0%, #f0f0f0 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8b5fbf, #6c5ce7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
}

/* Main content */
.main {
    padding: 3rem 0;
}

.generator-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(139, 95, 191, 0.15);
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

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

/* Type selector */
.type-selector {
    margin-bottom: 1.5rem;
}

.type-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

/* QR Type Selector */
.qr-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qr-type-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.qr-type-preview {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.qr-type-selector .icon-option {
    min-width: 70px;
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.25rem;
}

.qr-type-selector .icon-option span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Input groups */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group.hidden {
    display: none;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #8b5fbf;
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Contact fields */
.contact-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.field-row {
    display: flex;
    gap: 1rem;
}

.field-row input {
    flex: 1;
}

/* WiFi fields */
.wifi-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wifi-fields .field-row {
    display: flex;
    gap: 1rem;
}

.wifi-fields .field-row input {
    flex: 2;
}

.wifi-fields .field-row select {
    flex: 1;
}

/* Options */
.options {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.option-group {
    flex: 1;
    min-width: 150px;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.option-group input[type="color"] {
    width: 100%;
    height: 50px;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.option-group input[type="color"]:focus {
    outline: none;
    border-color: #8b5fbf;
}

/* Icon Selectors */
.icon-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.icon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
}

.icon-option:hover {
    border-color: #8b5fbf;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.2);
}

.icon-option.active {
    border-color: #8b5fbf;
    background: rgba(139, 95, 191, 0.1);
    color: #8b5fbf;
}

.icon-option span {
    font-size: 0.8rem;
    font-weight: 500;
}

.icon-option small {
    font-size: 0.7rem;
    color: #666;
    font-weight: 400;
}

/* Size Icons */
.size-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.qr-preview {
    background: #8b5fbf;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.size-icon.small .qr-preview {
    width: 12px;
    height: 12px;
}

.size-icon.medium .qr-preview {
    width: 16px;
    height: 16px;
}

.size-icon.large .qr-preview {
    width: 20px;
    height: 20px;
}

.size-icon.xlarge .qr-preview {
    width: 24px;
    height: 24px;
}

/* Shape Icons */
.shape-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.qr-shape-preview {
    background: #8b5fbf;
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.qr-shape-preview.square {
    border-radius: 2px;
}

.qr-shape-preview.rounded {
    border-radius: 6px;
}

.qr-shape-preview.circle {
    border-radius: 50%;
}

/* Frame Icons */
.frame-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qr-frame-preview {
    background: #8b5fbf;
    width: 20px;
    height: 20px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.qr-frame-preview.none {
    border: none;
}

.qr-frame-preview.simple {
    border: 2px solid #8b5fbf;
    background: white;
}

.qr-frame-preview.thick {
    border: 3px solid #8b5fbf;
    background: white;
}

.qr-frame-preview.dashed {
    border: 2px dashed #8b5fbf;
    background: white;
}

.qr-frame-preview.double {
    border: 4px double #8b5fbf;
    background: white;
}

/* Logo Size Icons */
.logo-size-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease;
}

.qr-logo-preview {
    background: #8b5fbf;
    border-radius: 2px;
    position: relative;
    transition: all 0.3s ease;
}

.logo-size-icon.small .qr-logo-preview {
    width: 16px;
    height: 16px;
}

.logo-size-icon.medium .qr-logo-preview {
    width: 20px;
    height: 20px;
}

.logo-size-icon.large .qr-logo-preview {
    width: 24px;
    height: 24px;
}

.qr-logo-preview::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 50%;
}

.logo-size-icon.small .qr-logo-preview::after {
    width: 4px;
    height: 4px;
}

.logo-size-icon.medium .qr-logo-preview::after {
    width: 6px;
    height: 6px;
}

.logo-size-icon.large .qr-logo-preview::after {
    width: 8px;
    height: 8px;
}

/* Logo Position Icons */
.logo-position-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease;
}

.qr-position-preview {
    background: #8b5fbf;
    width: 20px;
    height: 20px;
    border-radius: 2px;
    position: relative;
    transition: all 0.3s ease;
}

.qr-position-preview::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
    width: 4px;
    height: 4px;
}

.qr-position-preview.center::after {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.qr-position-preview.top-left::after {
    top: 2px;
    left: 2px;
}

.qr-position-preview.top-right::after {
    top: 2px;
    right: 2px;
}

.qr-position-preview.bottom-left::after {
    bottom: 2px;
    left: 2px;
}

.qr-position-preview.bottom-right::after {
    bottom: 2px;
    right: 2px;
}

/* Logo section */
.logo-section {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 2px dashed rgba(139, 95, 191, 0.3);
}

.logo-section h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.logo-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.logo-upload-btn {
    padding: 0.75rem 1.5rem;
    background: #8b5fbf;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.logo-upload-btn:hover {
    background: #6c5ce7;
}

.logo-filename {
    color: #666;
    font-size: 0.9rem;
    flex: 1;
    min-width: 150px;
}

.remove-logo-btn {
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.remove-logo-btn:hover {
    background: #c82333;
}

.logo-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo-options .option-group {
    min-width: 120px;
}

/* Generate button */
.generate-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #8b5fbf, #6c5ce7);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 95, 191, 0.4);
}

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

/* Output section */
.output-section {
    margin-top: 2rem;
    text-align: center;
}

.qr-result {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 2rem;
    border: 2px dashed rgba(139, 95, 191, 0.3);
    backdrop-filter: blur(5px);
}

.qr-result h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.qr-code-container img {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* QR Code Shapes */
.qr-code-container .qr-square {
    border-radius: 10px;
}

.qr-code-container .qr-rounded {
    border-radius: 20px;
}

.qr-code-container .qr-circle {
    border-radius: 50%;
}

/* QR Code Frames */
.qr-code-container .qr-frame-none {
    border: none;
}

.qr-code-container .qr-frame-simple {
    border: 2px solid #8b5fbf;
    padding: 10px;
    border-radius: 15px;
}

.qr-code-container .qr-frame-thick {
    border: 4px solid #8b5fbf;
    padding: 15px;
    border-radius: 20px;
}

.qr-code-container .qr-frame-dashed {
    border: 3px dashed #8b5fbf;
    padding: 12px;
    border-radius: 15px;
}

.qr-code-container .qr-frame-double {
    border: 6px double #8b5fbf;
    padding: 15px;
    border-radius: 20px;
}

/* Logo overlay */
.qr-code-container {
    position: relative;
    display: inline-block;
}

.qr-logo-overlay {
    position: absolute;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.qr-logo-overlay img {
    border-radius: 50%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* Logo positions */
.qr-logo-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.qr-logo-top-left {
    top: 10%;
    left: 10%;
}

.qr-logo-top-right {
    top: 10%;
    right: 10%;
}

.qr-logo-bottom-left {
    bottom: 10%;
    left: 10%;
}

.qr-logo-bottom-right {
    bottom: 10%;
    right: 10%;
}

.qr-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    color: #8b5fbf;
    border: 2px solid #8b5fbf;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #8b5fbf;
    color: white;
}

.qr-placeholder {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 3rem 2rem;
    border: 2px dashed rgba(139, 95, 191, 0.3);
    color: #666;
    backdrop-filter: blur(5px);
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Features section */
.features-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(139, 95, 191, 0.15);
    backdrop-filter: blur(10px);
}

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

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

.feature-card {
    text-align: center;
    padding: 1.5rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    transition: transform 0.3s ease;
    backdrop-filter: blur(5px);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.2rem;
}

.feature-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    color: #666;
    margin-top: 3rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .generator-section,
    .features-section {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .input-section h2 {
        font-size: 1.5rem;
    }
    
    .options {
        flex-direction: column;
    }
    
    .field-row {
        flex-direction: column;
    }
    
    .qr-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .icon-selector {
        justify-content: center;
    }
    
    .icon-option {
        min-width: 50px;
        padding: 0.5rem;
    }
    
    .icon-option span {
        font-size: 0.7rem;
    }
    
    .qr-type-selector {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 0.25rem;
    }
    
    .qr-type-selector .icon-option {
        min-width: 60px;
        padding: 0.4rem;
    }
    
    .qr-type-selector .icon-option span {
        font-size: 0.65rem;
    }
    
    .qr-type-icon {
        width: 32px;
        height: 32px;
    }
    
    .qr-type-preview {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }
    
    .generator-section,
    .features-section {
        padding: 1rem;
    }
    
    .input-section h2 {
        font-size: 1.3rem;
    }
    
    .qr-placeholder {
        padding: 2rem 1rem;
    }
    
    .placeholder-icon {
        font-size: 2.5rem;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Loading animation */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Loading animation border color */
.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #8b5fbf;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
