/* SuperDuper QR Code Generator Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    animation: gradientShift 10s ease infinite;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.subtitle {
    opacity: 0.9;
    font-size: 1.1em;
    position: relative;
    z-index: 1;
    font-weight: 300;
}

main {
    padding: 40px;
}

.input-section {
    margin-bottom: 30px;
}

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

#text-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

#text-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.input-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.char-count {
    font-weight: 500;
}

.encoding-mode {
    color: #667eea;
    font-weight: 600;
}

.controls-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.control-group {
    display: flex;
    flex-direction: column;
}

.control-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 10px;
}

select, input[type="color"] {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

input[type="color"] {
    height: 45px;
    padding: 5px;
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

#dot-radius-value,
#dot-size-value,
#position-radius-value {
    display: inline-block;
    margin-left: 10px;
    font-weight: 600;
    color: #667eea;
    min-width: 50px;
}

.action-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.generate-btn, .clear-btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.clear-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

.clear-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
}

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

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

.qr-container {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px dashed rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.qr-container.has-qr {
    border: 2px solid rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.9);
}

#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode canvas, #qrcode img {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.placeholder-icon {
    font-size: 4em;
    margin-bottom: 15px;
    opacity: 0.6;
}

.placeholder p {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.placeholder-subtitle {
    font-size: 0.9em !important;
    opacity: 0.7;
}

.download-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.download-btn {
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn:not(.secondary) {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.download-btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

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

.download-btn.secondary:hover {
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.info-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
}

.info-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 700;
}

.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.features-list li {
    padding: 8px 0;
    font-weight: 500;
    color: #555;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-container #qrcode > * {
    animation: fadeInUp 0.5s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2.2em;
    }
    
    main {
        padding: 25px;
    }
    
    .controls-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .action-section {
        flex-direction: column;
        align-items: center;
    }
    
    .generate-btn, .clear-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .download-section {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: 25px 20px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    main {
        padding: 20px;
    }
    
    .qr-container {
        padding: 20px;
        min-height: 280px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .container {
        background: rgba(30, 30, 30, 0.95);
        color: #e0e0e0;
    }
    
    .input-section label,
    .control-group label {
        color: #ccc;
    }
    
    #text-input {
        background: rgba(50, 50, 50, 0.9);
        color: #e0e0e0;
        border-color: #555;
    }
    
    select {
        background: #444;
        color: #e0e0e0;
        border-color: #555;
    }
    
    .qr-container {
        background: rgba(40, 40, 40, 0.8);
    }
    
    .qr-container.has-qr {
        background: rgba(50, 50, 50, 0.9);
    }
    
    .info-section {
        background: rgba(102, 126, 234, 0.15);
    }
    
    .features-list li {
        color: #ccc;
    }
}

/* Footer */
#footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.footer-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    font-style: italic;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-separator {
    opacity: 0.5;
}

.footer-copyright {
    margin-top: 1rem;
    font-size: 0.85rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-separator {
        display: none;
    }
}
