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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    flex: 1;
    align-items: start;
}

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

/* Input section */
.input-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

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

.input-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
    font-size: 1.1rem;
}

.text-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.text-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.text-input::placeholder {
    color: #9ca3af;
}

/* Options group */
.options-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 480px) {
    .options-group {
        grid-template-columns: 1fr;
    }
}

.option-item {
    display: flex;
    flex-direction: column;
}

.option-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.95rem;
}

.size-select,
.color-select {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.size-select:focus,
.color-select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Generate button */
.generate-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-bottom: 15px;
}

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

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

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

/* Example buttons */
.example-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.example-btn {
    flex: 1;
    padding: 12px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.example-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.5);
}

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

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

/* Output section */
.output-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.qr-container {
    margin-bottom: 25px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.qr-container.has-qr {
    border-color: #10b981;
    background: #f0fdf4;
}

.placeholder {
    color: #9ca3af;
}

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

.placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
}

#qrCode {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Debug info */
.debug-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.debug-info h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1rem;
}

.debug-info pre {
    background: #ffffff;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    overflow-x: auto;
    margin: 5px 0;
    font-size: 0.8rem;
}

/* Download section */
.download-section {
    margin-top: 20px;
}

.download-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

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

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* 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: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Error message */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-top: 15px;
    font-weight: 500;
}

/* Success message */
.success-message {
    background: #f0fdf4;
    color: #059669;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    margin-top: 15px;
    font-weight: 500;
}
