/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: #000000;
    text-decoration: none;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-back:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Main Content */
.main-content {
    padding: 60px 0 120px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 80px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: #000000;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 20px;
    color: #666666;
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

.template-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Templates Section */
.templates-section {
    margin-bottom: 120px;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.template-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.template-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
}

.template-preview {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.template-mockup {
    width: 100%;
    max-width: 280px;
    height: 320px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* Modern Template Styles */
.modern-template {
    border-top: 4px solid #FFD700;
}

.modern-template .template-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.modern-template .template-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    flex-shrink: 0;
}

.modern-template .template-info {
    flex: 1;
}

.modern-template .template-name-line {
    height: 16px;
    background: #000000;
    border-radius: 4px;
    width: 80%;
    margin-bottom: 8px;
}

.modern-template .template-contact-line {
    height: 10px;
    background: #666666;
    border-radius: 4px;
    width: 60%;
}

/* Classic Template Styles */
.classic-template {
    border: 1px solid #e5e7eb;
}

.classic-template .classic-header {
    text-align: center;
    margin-bottom: 16px;
}

.classic-template .classic-name {
    height: 18px;
    background: #000000;
    border-radius: 4px;
    width: 70%;
    margin: 0 auto 8px;
}

.classic-template .classic-contact {
    height: 10px;
    background: #666666;
    border-radius: 4px;
    width: 50%;
    margin: 0 auto;
}

.classic-template .template-divider {
    height: 1px;
    background: #000000;
    margin: 16px 0;
}

.classic-template .classic-title {
    height: 12px;
    background: #000000;
    border-radius: 4px;
    width: 40%;
    margin-bottom: 12px;
}

/* Creative Template Styles */
.creative-template {
    display: flex;
    padding: 0;
}

.creative-template .template-sidebar {
    width: 35%;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    padding: 20px 16px;
    color: #000000;
}

.creative-template .creative-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 16px;
}

.creative-template .creative-sidebar-title {
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    width: 80%;
    margin-bottom: 8px;
}

.creative-template .creative-skills {
    margin-top: 16px;
}

.creative-template .creative-skill {
    height: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    width: 60%;
    margin-bottom: 4px;
}

.creative-template .template-main {
    flex: 1;
    padding: 20px 16px;
}

.creative-template .creative-main-header {
    margin-bottom: 16px;
}

.creative-template .creative-name {
    height: 16px;
    background: #000000;
    border-radius: 4px;
    width: 70%;
    margin-bottom: 8px;
}

.creative-template .creative-contact {
    height: 10px;
    background: #666666;
    border-radius: 4px;
    width: 50%;
}

.creative-template .creative-main-title {
    height: 12px;
    background: #FFD700;
    border-radius: 4px;
    width: 50%;
    margin-bottom: 12px;
}

/* Minimal Template Styles */
.minimal-template {
    border: 2px solid #f3f4f6;
    background: #ffffff;
}

.minimal-template .minimal-header {
    text-align: left;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.minimal-template .minimal-name {
    height: 20px;
    background: #000000;
    border-radius: 4px;
    width: 60%;
    margin-bottom: 12px;
}

.minimal-template .minimal-contact {
    height: 10px;
    background: #9ca3af;
    border-radius: 4px;
    width: 45%;
}

.minimal-template .minimal-title {
    height: 12px;
    background: #374151;
    border-radius: 4px;
    width: 35%;
    margin-bottom: 12px;
}

.minimal-template .minimal-skills {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Technical Template Styles */
.technical-template {
    border-left: 4px solid #3b82f6;
}

.technical-template .technical-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #3b82f6;
}

.technical-template .technical-name {
    height: 18px;
    background: #000000;
    border-radius: 4px;
    width: 70%;
    margin-bottom: 8px;
}

.technical-template .technical-contact {
    height: 10px;
    background: #666666;
    border-radius: 4px;
    width: 55%;
    margin-bottom: 12px;
}

.technical-template .technical-divider {
    height: 2px;
    background: #3b82f6;
    margin: 12px 0;
}

.technical-template .technical-layout {
    display: flex;
    gap: 16px;
}

.technical-template .technical-main {
    flex: 2;
}

.technical-template .technical-sidebar {
    flex: 1;
}

.technical-template .technical-title {
    height: 12px;
    background: #3b82f6;
    border-radius: 4px;
    width: 50%;
    margin-bottom: 12px;
}

.technical-template .technical-sidebar-title {
    height: 10px;
    background: #3b82f6;
    border-radius: 4px;
    width: 70%;
    margin-bottom: 10px;
}

.technical-template .technical-skills {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.technical-template .technical-skill-bar {
    height: 6px;
    background: #dbeafe;
    border-radius: 3px;
    position: relative;
}

.technical-template .technical-skill-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 75%;
    background: #3b82f6;
    border-radius: 3px;
}

/* Executive Template Styles */
.executive-template {
    border: 2px solid #1f2937;
    background: #ffffff;
}

.executive-template .executive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #1f2937;
}

.executive-template .executive-name-section {
    flex: 1;
}

.executive-template .executive-name {
    height: 20px;
    background: #000000;
    border-radius: 4px;
    width: 80%;
    margin-bottom: 8px;
}

.executive-template .executive-title-line {
    height: 12px;
    background: #6b7280;
    border-radius: 4px;
    width: 60%;
}

.executive-template .executive-contact {
    text-align: right;
}

.executive-template .executive-contact-line {
    height: 10px;
    background: #9ca3af;
    border-radius: 4px;
    width: 100px;
    margin-bottom: 6px;
}

.executive-template .executive-summary {
    margin-bottom: 20px;
}

.executive-template .executive-section-title {
    height: 14px;
    background: #1f2937;
    border-radius: 4px;
    width: 40%;
    margin-bottom: 12px;
}

.executive-template .executive-experience {
    margin-bottom: 16px;
}

.executive-template .executive-item {
    margin-bottom: 16px;
}

.executive-template .executive-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* Common Template Elements */
.template-section {
    margin-bottom: 16px;
}

.template-section-title {
    height: 12px;
    background: #FFD700;
    border-radius: 4px;
    width: 40%;
    margin-bottom: 12px;
}

.template-content-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.template-line {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
}

.template-line.full { width: 100%; }
.template-line.large { width: 85%; }
.template-line.medium { width: 70%; }
.template-line.small { width: 55%; }

.template-skills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.template-skill-tag {
    height: 12px;
    width: 40px;
    background: #FFD700;
    border-radius: 6px;
}

/* Template Overlay */
.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.btn-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Template Info Section */
.template-info-section {
    padding: 32px;
}

.template-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000000;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.template-badge.professional {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #ffffff;
}

.template-badge.creative {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: #ffffff;
}

.template-badge.minimal {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #ffffff;
}

.template-badge.technical {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.template-badge.executive {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #ffffff;
}

.template-title {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 12px;
}

.template-description {
    color: #666666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.template-features {
    margin-bottom: 24px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333333;
}

.feature-item svg {
    color: #FFD700;
    flex-shrink: 0;
}

.template-industries {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.industry-tag {
    padding: 4px 12px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.btn-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000000;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Features Section */
.features-section {
    text-align: center;
}

.features-title {
    font-size: 36px;
    font-weight: 800;
    color: #000000;
    margin-bottom: 60px;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card {
    background: #ffffff;
    padding: 40px 32px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD700;
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 16px;
}

.feature-description {
    color: #666666;
    line-height: 1.6;
}

/* Preview Modal */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.preview-modal.active {
    display: flex;
}

.preview-modal-content {
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    height: 90%;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.preview-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
}

.preview-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
}

.btn-close-modal {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover {
    background: #f3f4f6;
    color: #374151;
}

.preview-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: #f8f9fa;
}

.preview-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 800px;
    min-height: 600px;
}

.preview-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.btn-secondary {
    padding: 12px 24px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .template-stats {
        gap: 32px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .features-title {
        font-size: 28px;
    }
    
    .template-info-section {
        padding: 24px;
    }
    
    .preview-modal-content {
        width: 95%;
        height: 95%;
    }
    
    .preview-modal-header,
    .preview-modal-footer {
        padding: 16px 20px;
    }
    
    .preview-modal-body {
        padding: 20px;
    }
    
    .preview-container {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 40px 0 80px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .template-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .template-preview {
        height: 300px;
        padding: 24px;
    }
    
    .template-mockup {
        max-width: 200px;
        height: 240px;
        padding: 16px;
    }
    
    .template-info-section {
        padding: 20px;
    }
    
    .template-title {
        font-size: 20px;
    }
    
    .template-description {
        font-size: 14px;
    }
    
    .preview-modal-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-secondary,
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}