* {
    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%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 850px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #333;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

h1 i {
    color: #667eea;
    font-size: 2rem;
}

.subtitle {
    color: #888;
    margin-top: 5px;
    font-size: 0.95rem;
}

.qr-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #667eea;
    width: 18px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

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

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

/* Color Picker Custom */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-wrapper input[type="color"] {
    width: 50px;
    height: 50px;
    padding: 3px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

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

.color-hex {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #555;
    background: #f5f5f5;
    padding: 5px 12px;
    border-radius: 5px;
}

/* Style Selector */
.style-options {
    margin-top: 5px;
}

.style-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.style-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
}

.style-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.style-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.style-btn.active i {
    color: white;
}

.style-btn i {
    color: #667eea;
}

/* Generate Button */
#generateBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

#generateBtn:active {
    transform: translateY(0);
}

#generateBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error Message */
.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #c33;
}

/* QR Result */
.qr-result {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.qr-result h2 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.qr-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s;
}

.qr-container:hover {
    transform: scale(1.02);
}

.qr-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.qr-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.qr-container:hover .qr-overlay {
    opacity: 1;
}

.qr-badge {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* QR Info */
.qr-info {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
    text-align: left;
}

.info-item {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #555;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-item i {
    color: #667eea;
    font-size: 1rem;
}

.info-item strong {
    color: #333;
}

/* Action Buttons */
.qr-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.btn {
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* QR Details */
.qr-details {
    margin-top: 15px;
    text-align: left;
    background: white;
    border-radius: 8px;
    padding: 10px 15px;
}

.qr-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #555;
    padding: 5px 0;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 0;
    font-size: 0.9rem;
    color: #555;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #888;
    font-size: 0.85rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    position: relative;
    animation: slideDown 0.3s ease;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.share-btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.whatsapp {
    background: #25D366;
}

.twitter {
    background: #1DA1F2;
}

.facebook {
    background: #1877F2;
}

.email {
    background: #EA4335;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .qr-info {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.5rem;
    }

    .qr-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .modal-content {
        margin: 20% 15px;
        padding: 20px;
    }

    .share-options {
        grid-template-columns: 1fr;
    }

    .style-selector {
        flex-direction: column;
    }

    .style-btn {
        justify-content: center;
    }

    .color-picker-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .qr-container {
        padding: 10px;
    }

    .qr-container img {
        max-width: 200px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}