/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --pix-color: #32bcad;
    --pix-dark: #2a9d8f;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--pix-color)) !important;
}

.pix-icon-header {
    opacity: 0.8;
}

/* Model Selection Cards */
.model-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.model-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.model-card.active {
    border-color: var(--pix-color);
    background: linear-gradient(135deg, #f8f9fa, #e3f2fd);
}

.model-preview {
    height: 120px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.model-header {
    font-size: 10px;
    font-weight: bold;
    text-align: center;
}

.model-qr {
    width: 30px;
    height: 30px;
    background: #333;
    border-radius: 4px;
}

.model-text {
    font-size: 8px;
    text-align: center;
}

.model-name {
    text-align: center;
    font-weight: 500;
    color: #495057;
}

/* Classic Model */
.classic-preview {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 1px solid #dee2e6;
}

.classic-preview .model-header {
    color: #333;
}

.classic-preview .model-text {
    color: #666;
}

/* Modern Model */
.modern-preview {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.modern-preview .model-qr {
    background: white;
}

/* Elegant Model */
.elegant-preview {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    color: #8b4513;
}

.elegant-preview .model-qr {
    background: #8b4513;
}

/* Plaquinha Preview Container */
.plaquinha-container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.plaquinha-content {
    padding: 30px 20px;
    text-align: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

/* PIX Header */
.pix-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.pix-icon {
    margin-bottom: 10px;
    color: var(--pix-color);
}

.pix-header h3 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    letter-spacing: 1px;
}

/* QR Code Container */
.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex-grow: 1;
}

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

#qrcode canvas {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Custom Text */
.custom-text-container {
    margin-top: 20px;
}

#previewText {
    margin: 0;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Logo Container */
.logo-container {
    position: absolute;
    top: 15px;
    right: 15px;
    max-width: 80px;
    max-height: 80px;
}

#logoPreview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Model Styles */
.classic-style {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    color: #333;
}

.classic-style .pix-header h3 {
    color: #333;
}

.modern-style {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.modern-style .pix-header h3 {
    color: white;
}

.modern-style .pix-icon {
    color: white;
}

.elegant-style {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    color: #8b4513;
}

.elegant-style .pix-header h3 {
    color: #8b4513;
}

.elegant-style .pix-icon {
    color: #8b4513;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--pix-color);
    box-shadow: 0 0 0 0.2rem rgba(50, 188, 173, 0.25);
}

.form-control-color {
    width: 100%;
    height: 40px;
    border-radius: 8px;
}

.form-range::-webkit-slider-thumb {
    background: var(--pix-color);
}

.form-range::-moz-range-thumb {
    background: var(--pix-color);
    border: none;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: var(--pix-color);
    border-color: var(--pix-color);
}

.btn-success:hover {
    background-color: var(--pix-dark);
    border-color: var(--pix-dark);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 1px solid #e9ecef;
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
}

/* AdSense Placeholder */
.adsense-container {
    min-height: 100px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.ad-placeholder {
    text-align: center;
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    background: linear-gradient(90deg, var(--pix-color), var(--primary-color));
}

/* Responsive Design */
@media (max-width: 768px) {
    .plaquinha-container {
        max-width: 100%;
    }
    
    .plaquinha-content {
        padding: 20px 15px;
        min-height: 400px;
    }
    
    .pix-header h3 {
        font-size: 20px;
    }
    
    .pix-icon {
        width: 30px;
        height: 30px;
    }
    
    .model-card {
        margin-bottom: 15px;
    }
    
    .logo-container {
        max-width: 60px;
        max-height: 60px;
    }
}

/* Print Styles for PDF */
@media print {
    body {
        background: white;
    }
    
    .plaquinha-container {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Utility Classes */
.text-pix {
    color: var(--pix-color) !important;
}

.bg-pix {
    background-color: var(--pix-color) !important;
}

.border-pix {
    border-color: var(--pix-color) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--pix-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pix-dark);
}

