:root {
    --primary-color: #667eea;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.app-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.app-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Input Section Styles */
.input-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-container h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

input, textarea, select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generate-btn:hover {
    transform: translateY(-2px);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Preview Section Styles */
.preview-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.template-selector {
    margin-bottom: 20px;
}

.template-selector h3 {
    margin-bottom: 15px;
    color: #333;
}

.template-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.template-btn {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.template-btn:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.template-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.resume-container {
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    min-height: 600px;
    margin-bottom: 20px;
    overflow: hidden;
}

.resume-preview {
    padding: 40px;
    background: white;
    min-height: 600px;
    font-size: 14px;
    line-height: 1.6;
}

.resume-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 520px;
    color: #999;
    text-align: center;
}

.resume-placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.resume-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.placeholder-subtitle {
    font-size: 0.9rem !important;
    opacity: 0.7;
}

/* Resume Template Styles */
.resume-content {
    max-width: 100%;
    margin: 0 auto;
}

.resume-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.resume-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.resume-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.resume-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
}

.resume-section {
    margin-bottom: 25px;
}

.resume-section h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color);
}

.resume-section p {
    margin-bottom: 10px;
}

.resume-section ul {
    list-style: none;
    padding-left: 0;
}

.resume-section li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.resume-section li:before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Template Variations */
.modern-template {
    font-family: 'Inter', sans-serif;
}

.modern-template .resume-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    color: white;
    margin: -40px -40px 30px -40px;
    padding: 40px;
}

.modern-template .resume-name,
.modern-template .resume-title {
    color: white;
}

.classic-template {
    font-family: 'Times New Roman', serif;
}

.classic-template .resume-header {
    border-bottom: 3px solid #333;
}

.classic-template .resume-section h3 {
    border-bottom: 1px solid #333;
    color: #333;
}

.creative-template {
    font-family: 'Inter', sans-serif;
}

.creative-template .resume-header {
    background: #f8f9ff;
    margin: -40px -40px 30px -40px;
    padding: 40px;
    border-left: 5px solid var(--primary-color);
}

.creative-template .resume-section h3 {
    background: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    border: none;
}

.minimal-template {
    font-family: 'Inter', sans-serif;
}

.minimal-template .resume-section h3 {
    border-bottom: 1px solid #ddd;
    color: #555;
    font-weight: 500;
}

.minimal-template .resume-header {
    border-bottom: 1px solid #ddd;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .template-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 15px;
    }
    
    .input-section,
    .preview-section {
        padding: 20px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .resume-contact {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .resume-preview {
        padding: 20px;
    }
    
    .modern-template .resume-header {
        margin: -20px -20px 20px -20px;
        padding: 20px;
    }
    
    .creative-template .resume-header {
        margin: -20px -20px 20px -20px;
        padding: 20px;
    }
}
.resume-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: block;
    border: 3px solid var(--primary-color);
}
