/* Resume Builder Pro - Builder Styles */
:root {
    --rb-primary: #2563eb;
    --rb-primary-hover: #1d4ed8;
    --rb-danger: #dc2626;
    --rb-success: #059669;
    --rb-warning: #d97706;
    --rb-bg: #f8fafc;
    --rb-card: #ffffff;
    --rb-text: #1e293b;
    --rb-text-light: #64748b;
    --rb-border: #e2e8f0;
    --rb-radius: 12px;
    --rb-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --rb-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.rb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--rb-text);
    line-height: 1.6;
}

/* Hero Section */
.rb-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--rb-radius);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.rb-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

.rb-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.3);
}

.rb-title {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 20px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.rb-subtitle {
    font-size: 20px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Builder Layout */
.rb-builder-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 1024px) {
    .rb-builder-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Editor Panel */
.rb-editor-panel {
    background: var(--rb-card);
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-shadow);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.rb-tabs {
    display: flex;
    border-bottom: 2px solid var(--rb-border);
    background: var(--rb-bg);
}

.rb-tab {
    flex: 1;
    padding: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--rb-text-light);
    transition: all 0.3s;
    position: relative;
}

.rb-tab:hover {
    color: var(--rb-primary);
    background: rgba(37, 99, 235, 0.05);
}

.rb-tab.active {
    color: var(--rb-primary);
}

.rb-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--rb-primary);
}

.rb-tab-content {
    display: none;
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.rb-tab-content.active {
    display: block;
}

/* Form Elements */
.rb-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--rb-border);
}

.rb-section:last-child {
    border-bottom: none;
}

.rb-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--rb-text);
}

.rb-section-title svg {
    color: var(--rb-primary);
}

.rb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.rb-full-width {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .rb-form-grid {
        grid-template-columns: 1fr;
    }
}

.rb-form-group {
    display: flex;
    flex-direction: column;
}

.rb-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--rb-text);
}

.rb-form-group input,
.rb-form-group textarea,
.rb-form-group select {
    padding: 12px;
    border: 2px solid var(--rb-border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

.rb-form-group input:focus,
.rb-form-group textarea:focus,
.rb-form-group select:focus {
    outline: none;
    border-color: var(--rb-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.rb-hint {
    font-size: 12px;
    color: var(--rb-text-light);
    margin-top: 6px;
}

.rb-char-count {
    text-align: right;
    font-size: 12px;
    color: var(--rb-text-light);
    margin-top: 4px;
}

/* Dynamic Sections */
.rb-dynamic-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rb-entry {
    background: var(--rb-bg);
    border: 2px solid var(--rb-border);
    border-radius: 8px;
    padding: 20px;
    position: relative;
}

.rb-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.rb-entry-title {
    font-weight: 600;
    color: var(--rb-text);
}

.rb-remove-btn {
    background: rgba(220, 38, 38, 0.1);
    color: var(--rb-danger);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.rb-remove-btn:hover {
    background: var(--rb-danger);
    color: white;
}

.rb-add-btn {
    margin-left: auto;
    background: var(--rb-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.rb-add-btn:hover {
    background: var(--rb-primary-hover);
    transform: translateY(-1px);
}

/* Skill Suggestions */
.rb-skill-suggestions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.rb-suggestion-label {
    font-size: 13px;
    color: var(--rb-text-light);
    font-weight: 500;
}

.rb-skill-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--rb-primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.rb-skill-tag:hover {
    background: var(--rb-primary);
    color: white;
}

/* Template Selector */
.rb-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.rb-template-card {
    border: 2px solid var(--rb-border);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.rb-template-card:hover {
    border-color: var(--rb-primary);
    transform: translateY(-2px);
    box-shadow: var(--rb-shadow);
}

.rb-template-card.active {
    border-color: var(--rb-primary);
    background: rgba(37, 99, 235, 0.05);
}

.rb-template-preview {
    width: 100%;
    height: 120px;
    background: var(--rb-bg);
    border-radius: 4px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.modern-preview {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    border-left: 4px solid var(--rb-primary);
}

.professional-preview {
    background: #ffffff;
    border-top: 3px solid #1e293b;
}

.minimal-preview {
    background: #fafafa;
    border: 1px solid #e2e8f0;
}

.creative-preview {
    background: linear-gradient(45deg, #fef3c7 0%, #ffffff 100%);
    border-top: 4px solid #f59e0b;
}

.executive-preview {
    background: #ffffff;
    border: 2px solid #1e293b;
}

.rb-template-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.rb-template-tag {
    font-size: 11px;
    color: var(--rb-text-light);
    background: var(--rb-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Color Picker */
.rb-color-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rb-color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.rb-color-option:hover {
    transform: scale(1.1);
}

.rb-color-option.active {
    border-color: var(--rb-text);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--rb-text);
}

/* Range Inputs */
.rb-form-group input[type="range"] {
    width: 100%;
    margin-bottom: 8px;
}

.rb-range-value {
    font-weight: 600;
    color: var(--rb-primary);
}

/* ATS Score */
.rb-ats-score {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--rb-bg);
    border-radius: 8px;
}

.rb-score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(var(--rb-primary) 0deg, var(--rb-border) 0deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.rb-score-circle::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
}

.rb-score-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--rb-text);
    position: relative;
    z-index: 1;
}

.rb-score-label {
    font-size: 12px;
    color: var(--rb-text-light);
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rb-score-details {
    flex: 1;
}

.rb-score-details p {
    margin: 0;
    color: var(--rb-text-light);
    font-size: 14px;
}

/* Tool Buttons */
.rb-tool-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rb-btn-primary,
.rb-btn-secondary,
.rb-btn-outline,
.rb-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 15px;
    width: 100%;
}

.rb-btn-primary {
    background: var(--rb-primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.rb-btn-primary:hover {
    background: var(--rb-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.rb-btn-secondary {
    background: var(--rb-bg);
    color: var(--rb-text);
    border: 2px solid var(--rb-border);
}

.rb-btn-secondary:hover {
    background: var(--rb-border);
}

.rb-btn-outline {
    background: transparent;
    color: var(--rb-text);
    border: 2px solid var(--rb-border);
}

.rb-btn-outline:hover {
    border-color: var(--rb-primary);
    color: var(--rb-primary);
    background: rgba(37, 99, 235, 0.05);
}

.rb-btn-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--rb-danger);
}

.rb-btn-danger:hover {
    background: var(--rb-danger);
    color: white;
}

.rb-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.rb-share-url {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.rb-share-url input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--rb-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--rb-bg);
}

/* Version List */
.rb-version-list {
    max-height: 200px;
    overflow-y: auto;
}

.rb-empty-state {
    text-align: center;
    color: var(--rb-text-light);
    font-style: italic;
    padding: 20px;
}

/* Preview Panel */
.rb-preview-panel {
    background: var(--rb-bg);
    border-radius: var(--rb-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 90vh;
    position: sticky;
    top: 20px;
}

.rb-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--rb-border);
}

.rb-zoom-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid var(--rb-border);
}

.rb-zoom-controls button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: var(--rb-text);
    border-radius: 4px;
    transition: all 0.3s;
}

.rb-zoom-controls button:hover {
    background: var(--rb-bg);
}

#zoom-level {
    font-size: 14px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.rb-preview-container {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #e2e8f0;
    border-radius: 8px;
    padding: 40px;
}

.rb-resume-preview {
    background: white;
    width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform-origin: top center;
    transition: transform 0.3s;
}

/* SEO Content */
.rb-seo-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.rb-seo-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 48px 0 24px;
    color: var(--rb-text);
}

.rb-seo-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--rb-text);
}

.rb-seo-content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--rb-text-light);
    margin-bottom: 20px;
}

.rb-seo-content ul {
    margin-bottom: 24px;
    padding-left: 24px;
}

.rb-seo-content li {
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--rb-text-light);
    line-height: 1.6;
}

.rb-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .rb-content-grid {
        grid-template-columns: 1fr;
    }
}

.rb-content-block {
    padding: 24px;
    background: var(--rb-bg);
    border-radius: var(--rb-radius);
    border-left: 4px solid var(--rb-primary);
}

/* FAQ Section */
.rb-faq-section {
    margin-top: 48px;
}

.rb-faq-item {
    border-bottom: 1px solid var(--rb-border);
    margin-bottom: 0;
}

.rb-faq-question {
    width: 100%;
    text-align: left;
    padding: 24px 0;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: var(--rb-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

.rb-faq-question:hover {
    color: var(--rb-primary);
}

.rb-faq-question::after {
    content: '+';
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.3s;
}

.rb-faq-item.active .rb-faq-question::after {
    transform: rotate(45deg);
}

.rb-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.rb-faq-item.active .rb-faq-answer {
    max-height: 500px;
}

.rb-faq-answer p {
    padding-bottom: 24px;
    margin: 0;
}

/* CTA Box */
.rb-cta-box {
    background: linear-gradient(135deg, var(--rb-primary) 0%, #7c3aed 100%);
    color: white;
    padding: 48px;
    border-radius: var(--rb-radius);
    text-align: center;
    margin-top: 60px;
}

.rb-cta-box h3 {
    font-size: 28px;
    margin: 0 0 16px;
    color: white;
}

.rb-cta-box p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 24px;
    color: white;
}

.rb-cta-btn {
    background: white;
    color: var(--rb-primary);
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.rb-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.3);
}

/* Animations */
@keyframes rb-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.rb-entry {
    animation: rb-fade-in 0.3s ease-out;
}

/* Print Optimization */
@media print {
    .rb-editor-panel,
    .rb-preview-toolbar,
    .rb-seo-content {
        display: none !important;
    }
    
    .rb-preview-panel {
        height: auto;
        background: white;
    }
    
    .rb-resume-preview {
        box-shadow: none;
        transform: none !important;
    }
}