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

body {
    font-family: 'Ubuntu', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #161a43 0%, #553d66 50%, #494c7f 100%);
    min-height: 100vh;
    padding: 20px;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header {
    background: linear-gradient(135deg, #161a43 0%, #553d66 50%, #494c7f 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(1px);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.app-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.form-section {
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

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

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 30px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
}

.color-input-wrapper {
    display: flex;
    gap: 10px;
}

.color-input-wrapper input[type="color"] {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}

.color-input-wrapper input[type="text"] {
    flex: 1;
}

/* Size Buttons */
.size-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-btn {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    min-width: 60px;
}

.size-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.size-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}



.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #161a43 0%, #553d66 50%, #494c7f 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

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

#qr-container {
    background: rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder p {
    font-size: 1rem;
    line-height: 1.5;
}

#qr-container canvas,
#qr-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.download-section {
    text-align: center;
}

.download-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.download-options {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.download-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.download-options label:hover {
    background: rgba(255, 255, 255, 0.1);
}

.download-options input[type="radio"] {
    width: auto;
    margin: 0;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .app-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    .form-section {
        padding: 20px;
    }
}

/* Color Presets */
.color-presets {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.color-presets label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.preset-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    min-width: 48px;
}

.preset-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* URL Suggestions */
.url-suggestion {
    margin-top: 8px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.url-suggestion small {
    color: #555;
    font-size: 0.9rem;
}

.suggestion-btn {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    margin: 0 5px;
}

.suggestion-btn:hover {
    color: #764ba2;
}

/* QR Type Specific Styles */
.type-fields {
    margin-bottom: 25px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.contact-grid .full-width {
    grid-column: 1 / -1;
}

.wifi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.wifi-grid .input-group:last-child {
    grid-column: 1 / -1;
}

.wifi-grid .input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.wifi-grid .input-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.location-grid .full-width {
    grid-column: 1 / -1;
}

.location-btn {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.location-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

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

/* Type Fields Responsive */
@media (max-width: 768px) {
    .contact-grid,
    .wifi-grid,
    .location-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-grid .full-width,
    .wifi-grid .full-width,
    .location-grid .full-width {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .options-grid {
        padding: 15px;
    }
    
    .color-input-wrapper {
        flex-direction: column;
    }
    
    .color-input-wrapper input[type="color"] {
        width: 100%;
        height: 40px;
    }
    
    .preset-buttons {
        gap: 6px;
    }
    
    .preset-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 40px;
    }
    
    .size-buttons {
        gap: 6px;
    }
    
    .size-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 50px;
    }
} 