/* ============================================
   TECHCLICK - AI Resume Builder Styles
   ============================================ */

/* ===== RESUME HERO ===== */
.resume-hero {
    padding: 120px 0 40px;
    text-align: center;
    background: var(--gradient-hero);
}

.resume-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.resume-hero p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== BUILDER LAYOUT ===== */
.resume-builder-section {
    padding: 2rem 0 4rem;
    background: var(--bg-dark);
}

.builder-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.builder-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 1rem;
}

.builder-left::-webkit-scrollbar {
    width: 6px;
}

.builder-left::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

/* ===== TEMPLATE SECTION ===== */
.template-section,
.photo-section,
.resume-form-section,
.export-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    border: var(--border-glow);
}

.template-section h3,
.photo-section h3,
.resume-form-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-cyan);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.template-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
}

.template-card:hover {
    border-color: rgba(0, 212, 255, 0.5);
}

.template-card.active {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.template-preview {
    height: 80px;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.template-card span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Template Mini Previews */
.professional-mini {
    background: linear-gradient(to bottom, #1a365d 20%, white 20%);
    border: 1px solid #1a365d;
}

.modern-mini {
    background: linear-gradient(to right, #2d3748 30%, white 30%);
    border: 1px solid #2d3748;
}

.creative-mini {
    background: linear-gradient(135deg, #7c3aed 30%, #ec4899 100%);
    border: 1px solid #7c3aed;
}

.minimal-mini {
    background: white;
    border: 1px solid #e2e8f0;
}

/* ===== PHOTO UPLOAD ===== */
.photo-upload-area {
    display: flex;
    justify-content: center;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 3px dashed rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition-fast);
}

.photo-preview:hover {
    border-color: var(--primary-cyan);
}

.photo-preview span {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== RESUME FORM ===== */
.resume-form-section .form-group {
    margin-bottom: 1rem;
}

.resume-form-section label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.resume-form-section input,
.resume-form-section textarea,
.resume-form-section select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.resume-form-section input:focus,
.resume-form-section textarea:focus {
    outline: none;
    border-color: var(--primary-cyan);
}

.resume-form-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.btn-add {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-cyan);
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-add:hover {
    background: var(--primary-cyan);
    color: var(--bg-dark);
}

/* Dynamic Entry Cards */
.entry-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.entry-card .remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 95, 87, 0.2);
    color: #ff5f57;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
}

.entry-card .form-row {
    margin-top: 0.5rem;
}

/* ===== EXPORT SECTION ===== */
.export-section {
    display: flex;
    gap: 1rem;
}

.export-section .btn {
    flex: 1;
    padding: 1rem;
    font-size: 0.9rem;
}

/* ===== PREVIEW AREA ===== */
.builder-center {
    position: sticky;
    top: 100px;
    height: calc(100vh - 200px);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h3 {
    font-size: 1rem;
    color: var(--primary-cyan);
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zoom-controls button {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

.zoom-controls span {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 40px;
    text-align: center;
}

.resume-preview-container {
    background: #374151;
    border-radius: 16px;
    padding: 2rem;
    height: calc(100% - 50px);
    overflow: auto;
    display: flex;
    justify-content: center;
}

.resume-preview {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform-origin: top center;
    transition: transform 0.3s ease;
}

/* ===== RESUME TEMPLATES ===== */

/* Professional Template */
.resume-preview.professional {
    font-family: 'Georgia', serif;
}

.resume-preview.professional .resume-header {
    background: #1a365d;
    color: white;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.resume-preview.professional .resume-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
}

.resume-preview.professional .resume-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.resume-preview.professional .resume-contact {
    font-size: 0.85rem;
    opacity: 0.9;
}

.resume-preview.professional .resume-body {
    padding: 2rem;
    color: #1a1a1a;
}

.resume-preview.professional .resume-section {
    margin-bottom: 1.5rem;
}

.resume-preview.professional .section-title {
    font-size: 1.1rem;
    color: #1a365d;
    border-bottom: 2px solid #1a365d;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.resume-preview.professional .resume-summary {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a4a4a;
}

.resume-preview.professional .experience-item,
.resume-preview.professional .education-item {
    margin-bottom: 1rem;
}

.resume-preview.professional .item-title {
    font-weight: 700;
    font-size: 1rem;
}

.resume-preview.professional .item-subtitle {
    color: #666;
    font-size: 0.9rem;
}

.resume-preview.professional .item-date {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.resume-preview.professional .item-description {
    font-size: 0.9rem;
    color: #4a4a4a;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.resume-preview.professional .skills-list,
.resume-preview.professional .certs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resume-preview.professional .skill-tag,
.resume-preview.professional .cert-tag {
    background: #e8f4fc;
    color: #1a365d;
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Modern Template */
.resume-preview.modern {
    font-family: 'Inter', sans-serif;
    display: grid;
    grid-template-columns: 200px 1fr;
}

.resume-preview.modern .resume-sidebar {
    background: #2d3748;
    color: white;
    padding: 1.5rem;
}

.resume-preview.modern .resume-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.resume-preview.modern .resume-name {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.resume-preview.modern .sidebar-section {
    margin-bottom: 1.5rem;
}

.resume-preview.modern .sidebar-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.resume-preview.modern .contact-item {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.resume-preview.modern .skill-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    margin: 0.25rem 0 0.5rem;
    overflow: hidden;
}

.resume-preview.modern .skill-fill {
    background: var(--primary-cyan);
    height: 100%;
    border-radius: 3px;
}

.resume-preview.modern .resume-main {
    padding: 1.5rem;
    color: #1a1a1a;
}

.resume-preview.modern .main-section {
    margin-bottom: 1.5rem;
}

.resume-preview.modern .main-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2d3748;
}

.resume-preview.modern .experience-item,
.resume-preview.modern .education-item {
    margin-bottom: 1rem;
}

.resume-preview.modern .item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.resume-preview.modern .item-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.resume-preview.modern .item-date {
    font-size: 0.8rem;
    color: #888;
}

.resume-preview.modern .item-subtitle {
    color: #666;
    font-size: 0.85rem;
}

.resume-preview.modern .item-description {
    font-size: 0.85rem;
    color: #4a4a4a;
    margin-top: 0.4rem;
    line-height: 1.5;
}

/* Creative Template */
.resume-preview.creative {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}

.resume-preview.creative .resume-header {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    padding: 2rem;
    text-align: center;
}

.resume-preview.creative .resume-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin: 0 auto 1rem;
    object-fit: cover;
}

.resume-preview.creative .resume-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.resume-preview.creative .resume-contact {
    font-size: 0.85rem;
    opacity: 0.9;
}

.resume-preview.creative .resume-body {
    padding: 2rem;
}

.resume-preview.creative .section-title {
    font-size: 1rem;
    background: linear-gradient(90deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.resume-preview.creative .resume-summary {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.resume-preview.creative .experience-item,
.resume-preview.creative .education-item {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #7c3aed;
}

.resume-preview.creative .item-title {
    font-weight: 700;
    color: white;
}

.resume-preview.creative .item-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.resume-preview.creative .item-date {
    color: #ec4899;
    font-size: 0.8rem;
}

.resume-preview.creative .item-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.4rem;
}

.resume-preview.creative .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resume-preview.creative .skill-tag {
    background: rgba(124, 58, 237, 0.3);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(124, 58, 237, 0.5);
}

.resume-preview.creative .cert-tag {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(236, 72, 153, 0.5);
}

/* Minimal Template */
.resume-preview.minimal {
    font-family: 'Inter', sans-serif;
    padding: 2.5rem;
    color: #1a1a1a;
}

.resume-preview.minimal .resume-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.resume-preview.minimal .resume-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
}

.resume-preview.minimal .resume-name {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.resume-preview.minimal .resume-contact {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.resume-preview.minimal .resume-section {
    margin-bottom: 1.5rem;
}

.resume-preview.minimal .section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.resume-preview.minimal .resume-summary {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4b5563;
}

.resume-preview.minimal .experience-item,
.resume-preview.minimal .education-item {
    margin-bottom: 1.25rem;
}

.resume-preview.minimal .item-title {
    font-weight: 600;
    font-size: 1rem;
}

.resume-preview.minimal .item-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
}

.resume-preview.minimal .item-date {
    color: #9ca3af;
    font-size: 0.85rem;
}

.resume-preview.minimal .item-description {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
    margin-top: 0.4rem;
}

.resume-preview.minimal .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.resume-preview.minimal .skill-tag {
    color: #1a1a1a;
    font-size: 0.9rem;
}

.resume-preview.minimal .skill-tag::before {
    content: "• ";
    color: #9ca3af;
}

/* ===== AI CHAT PANEL ===== */
.ai-chat-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg) translateX(50%);
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 100;
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
}

.ai-chat-panel {
    position: fixed;
    right: -400px;
    top: 100px;
    bottom: 20px;
    width: 380px;
    background: var(--bg-card);
    border-radius: 20px 0 0 20px;
    border: var(--border-glow);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.ai-chat-panel.active {
    right: 0;
}

.ai-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-chat-header h3 {
    font-size: 1rem;
    color: var(--primary-cyan);
}

.close-chat {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
}

.ai-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ai-chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.ai-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.ai-message.bot {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.ai-message.user {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    margin-left: 1rem;
}

.ai-message ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.ai-message li {
    margin-bottom: 0.25rem;
}

.ai-message em {
    color: var(--primary-cyan);
}

.ai-chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-resume-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
}

.ai-chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.ai-chat-input button {
    padding: 0.75rem 1.25rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .builder-container {
        grid-template-columns: 1fr;
    }

    .builder-center {
        position: relative;
        top: 0;
        height: auto;
    }

    .resume-preview-container {
        height: 600px;
    }

    .resume-preview {
        transform: scale(0.6);
        transform-origin: top center;
    }
}

@media (max-width: 768px) {
    .resume-hero {
        padding: 100px 0 30px;
    }

    .resume-hero h1 {
        font-size: 1.8rem;
    }

    .builder-left {
        max-height: none;
        overflow: visible;
    }

    .template-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .template-preview {
        height: 50px;
    }

    .resume-form-section .form-row {
        grid-template-columns: 1fr;
    }

    .ai-chat-panel {
        width: 100%;
        right: -100%;
        border-radius: 0;
    }

    .ai-chat-toggle {
        transform: rotate(0);
        bottom: 20px;
        right: 20px;
        top: auto;
        border-radius: 12px;
    }
}