/* ========================================
   Codetude RG Generator - Estilos
   ======================================== */

:root {
    --rg-primary: #f59e0b;
    --rg-success: #10b981;
    --rg-danger: #ef4444;
    --rg-light-bg: #ffffff;
    --rg-light-surface: #f8fafc;
    --rg-light-border: #e2e8f0;
    --rg-light-text: #1e293b;
    --rg-light-text-secondary: #64748b;
    --rg-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark-mode {
    --rg-light-bg: #1e293b;
    --rg-light-surface: #0f172a;
    --rg-light-border: #334155;
    --rg-light-text: #e2e8f0;
    --rg-light-text-secondary: #94a3b8;
    --rg-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* Container */
.codetude-rg-generator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Seções */
.rg-section {
    background: var(--rg-light-bg);
    border: 1px solid var(--rg-light-border);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--rg-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rg-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Headers */
.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--rg-light-text);
    margin: 0 0 10px 0;
}

.section-header h2 .icon {
    width: 28px;
    height: 28px;
    color: var(--rg-primary);
    stroke-width: 2;
}

.section-description {
    color: var(--rg-light-text-secondary);
    margin: 0;
    font-size: 15px;
}

/* Controles */
.generator-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.control-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--rg-light-text);
}

.control-group select,
.control-group input[type="number"] {
    padding: 10px 14px;
    border: 2px solid var(--rg-light-border);
    border-radius: 8px;
    font-size: 15px;
    background: var(--rg-light-surface);
    color: var(--rg-light-text);
    transition: border-color 0.2s ease;
}

.control-group select:focus,
.control-group input:focus {
    outline: none;
    border-color: var(--rg-primary);
}

/* Estado Info */
.estado-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 15px;
    background: var(--rg-light-surface);
    border-radius: 8px;
    border: 1px solid var(--rg-light-border);
}

.info-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--rg-light-bg);
    border-radius: 6px;
    font-size: 14px;
}

.info-badge strong {
    color: var(--rg-light-text);
    font-weight: 600;
}

.info-badge span {
    font-family: 'Courier New', monospace;
    color: var(--rg-primary);
    font-weight: 700;
}

/* Format Options */
.format-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--rg-primary);
}

.checkbox-label span {
    font-size: 14px;
    font-weight: 500;
    color: var(--rg-light-text);
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn .icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.btn-primary {
    background: var(--rg-primary);
    color: white;
}

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    width: 100%;
}

.btn-secondary {
    background: var(--rg-light-surface);
    color: var(--rg-light-text);
    border: 1px solid var(--rg-light-border);
}

.btn-secondary:hover {
    background: var(--rg-light-border);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Resultados */
.rg-results {
    margin-top: 25px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--rg-light-text);
    margin: 0;
}

.results-header h3 span {
    color: var(--rg-primary);
    font-weight: 700;
}

.results-actions {
    display: flex;
    gap: 10px;
}

.rg-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.rg-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--rg-light-surface);
    border: 2px solid var(--rg-light-border);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 600;
    color: var(--rg-light-text);
    transition: all 0.2s ease;
    cursor: pointer;
}

.rg-item:hover {
    border-color: var(--rg-primary);
    background: var(--rg-primary);
    color: white;
    transform: scale(1.02);
}

.rg-item .copy-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    flex-shrink: 0;
}

.rg-item:hover .copy-icon {
    opacity: 1;
}

.rg-item.copied {
    border-color: var(--rg-success);
    background: var(--rg-success);
    color: white;
}

/* Info Cards */
.info-content {
    display: grid;
    gap: 20px;
}

.info-card {
    padding: 20px;
    background: var(--rg-light-surface);
    border-left: 4px solid var(--rg-primary);
    border-radius: 8px;
}

.info-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--rg-light-text);
    margin: 0 0 12px 0;
}

.info-card p {
    color: var(--rg-light-text-secondary);
    line-height: 1.6;
    margin: 0 0 10px 0;
}

.info-card ul {
    margin: 10px 0;
    padding-left: 25px;
    color: var(--rg-light-text-secondary);
    line-height: 1.8;
}

.info-card .warning {
    color: var(--rg-danger);
    font-weight: 600;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    margin-top: 10px;
}

/* Grid de Estados */
.estados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.estado-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: var(--rg-light-bg);
    border: 1px solid var(--rg-light-border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.estado-item:hover {
    border-color: var(--rg-primary);
    transform: translateY(-2px);
}

.estado-item strong {
    color: var(--rg-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.estado-item span {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--rg-light-text);
    margin-bottom: 4px;
}

.estado-item small {
    color: var(--rg-light-text-secondary);
    font-size: 12px;
}

/* Toast */
.rg-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--rg-light-text);
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--rg-shadow);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rg-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.rg-toast svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Responsivo */
@media (max-width: 768px) {
    .codetude-rg-generator {
        padding: 15px;
    }
    
    .rg-section {
        padding: 20px;
    }
    
    .control-row {
        flex-direction: column;
    }
    
    .control-group {
        min-width: 100%;
    }
    
    .estado-info {
        flex-direction: column;
    }
    
    .format-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .rg-list {
        grid-template-columns: 1fr;
    }
    
    .estados-grid {
        grid-template-columns: 1fr;
    }
}