/* Modern QR Code Generator Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Form Section */
.form-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95em;
}

.form-group label strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.05em;
}

.hint {
    color: #666;
    font-size: 0.85em;
    font-weight: normal;
}

textarea, input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

/* Quick Examples */
.quick-examples {
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.example-label {
    font-size: 0.85em;
    color: #666;
    margin-right: 5px;
}

.example-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.example-btn:hover {
    background: #f0f0f0;
    border-color: #667eea;
    color: #667eea;
}

/* Color Section */
.color-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .color-section {
        grid-template-columns: 1fr;
    }
}

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

input[type="color"] {
    width: 60px;
    height: 45px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="color"]:hover {
    border-color: #667eea;
}

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

/* Color Presets */
.color-presets {
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.preset-label {
    font-size: 0.85em;
    color: #666;
    margin-right: 5px;
}

.preset-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* File Input */
.file-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

input[type="file"] {
    flex: 1;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
}

.clear-btn {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: #c82333;
}

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

.logo-preview img {
    max-width: 100px;
    max-height: 100px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    padding: 5px;
}

/* Range Input */
input[type="range"] {
    width: 100%;
    height: 8px;
    background: #e1e4e8;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#logoSizeValue {
    float: right;
    color: #667eea;
    font-weight: 600;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Preview Section */
.preview-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.preview-card h3 {
    margin-bottom: 20px;
    color: #333;
}

.qr-preview {
    background: white;
    border: 3px dashed #e1e4e8;
    border-radius: 15px;
    padding: 30px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

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

.placeholder {
    text-align: center;
    color: #999;
}

.placeholder p {
    margin-top: 15px;
    font-size: 0.95em;
}

.download-btn {
    width: 100%;
    padding: 14px 28px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
}

.info-box h4 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.info-box ul {
    list-style: none;
}

.info-box li {
    padding: 8px 0;
    font-size: 0.95em;
}

/* Use Cases */
.use-cases {
    padding: 40px;
    background: #f8f9fa;
}

.use-cases h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8em;
    color: #333;
}

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

.use-case-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.use-case-item strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.use-case-item code {
    display: block;
    background: #f1f3f4;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    color: #666;
    overflow-x: auto;
}

/* Footer */
footer {
    background: #2d3748;
    color: white;
    padding: 30px;
    text-align: center;
}

footer p {
    margin: 8px 0;
}

.privacy-note {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .form-section, .preview-card, .info-box {
        padding: 20px;
    }
}
