/* =============================================
   Brand Positioning Generator - Styles
   ============================================= */

:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --accent: #F59E0B;
    --danger: #EF4444;
    --warning: #F59E0B;
    --success: #10B981;
    
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --transition: all 0.2s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--gray-900);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =============================================
   Header
   ============================================= */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.logo i {
    font-size: 2rem;
}

.tagline {
    margin-top: 0.5rem;
    opacity: 0.9;
    font-size: 1rem;
}

/* =============================================
   Buttons
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* =============================================
   Main Content
   ============================================= */
.main-content {
    padding: 2rem 0 4rem;
}

/* =============================================
   Input Section
   ============================================= */
.input-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.section-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.section-header h2 {
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.section-header p {
    margin: 0;
    color: var(--gray-500);
}

/* =============================================
   Form Styles
   ============================================= */
.brand-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group label .required {
    color: var(--danger);
}

input[type="text"],
input[type="url"],
input[type="number"],
textarea,
select {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition);
    width: 100%;
    background: var(--white);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray-400);
}

textarea {
    resize: vertical;
    min-height: 70px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.625rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

.checkbox-item:hover {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.05);
}

.checkbox-item:has(input:checked) {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
}

.checkbox-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

/* Form Actions */
.form-actions {
    text-align: center;
    padding-top: 1rem;
}

.form-actions .hint {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* =============================================
   Report Section
   ============================================= */
.report-section {
    margin-top: 2rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.report-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
    gap: 1rem;
}

.report-header-bar h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    margin: 0;
}

.report-header-bar h2 i {
    color: var(--primary);
}

.report-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.report-content {
    padding: 2.5rem;
}

/* =============================================
   Generated Report Styles
   ============================================= */
.report-title {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--gray-200);
}

.report-title h1 {
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.report-title .subtitle {
    color: var(--gray-600);
    font-size: 1.125rem;
}

.report-title .date {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

.report-block {
    margin-bottom: 2.5rem;
    page-break-inside: avoid;
}

.report-block h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.375rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

.report-block h2 i {
    font-size: 1.125rem;
    opacity: 0.8;
}

.report-block h3 {
    font-size: 1.0625rem;
    color: var(--gray-800);
    margin: 1.5rem 0 0.75rem;
}

.report-block p {
    margin-bottom: 0.875rem;
    line-height: 1.75;
    color: var(--gray-700);
}

.report-block ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.report-block li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(129, 140, 248, 0.08));
    border-left: 4px solid var(--primary);
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1rem 0;
}

.highlight-box p {
    margin: 0;
    font-style: italic;
    color: var(--gray-800);
}

/* Grid Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.info-card.green { border-left-color: var(--success); }
.info-card.red { border-left-color: var(--danger); }
.info-card.yellow { border-left-color: var(--warning); }
.info-card.blue { border-left-color: var(--primary); }

.info-card h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.info-card p, .info-card ul {
    margin: 0;
    font-size: 0.9375rem;
}

.info-card ul {
    padding-left: 1.25rem;
}

/* Tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--gray-100);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
}

.tag.primary {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary-dark);
}

.tag.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--secondary-dark);
}

/* Archetype Badge */
.archetype-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: var(--radius-lg);
    margin: 1rem 0;
}

.archetype-display i {
    font-size: 2.5rem;
    opacity: 0.9;
}

.archetype-display h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.archetype-display p {
    margin: 0;
    opacity: 0.9;
    color: var(--white);
}

/* Persona Card */
.persona-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin: 1.25rem 0;
    border: 1px solid var(--gray-200);
}

.persona-card h4 {
    font-size: 1.125rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.persona-card p {
    margin-bottom: 0.625rem;
}

/* Campaign Card */
.campaign-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(129, 140, 248, 0.05));
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
}

.campaign-card h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Copy Block */
.copy-block {
    background: var(--gray-900);
    color: var(--gray-100);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    line-height: 1.7;
}

.copy-block.light {
    background: var(--gray-50);
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
}

/* SWOT Grid */
.swot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

@media (max-width: 640px) {
    .swot-grid {
        grid-template-columns: 1fr;
    }
}

.swot-card {
    padding: 1.25rem;
    border-radius: var(--radius);
}

.swot-card.strengths {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.swot-card.weaknesses {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.swot-card.opportunities {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.swot-card.threats {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.swot-card h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.swot-card.strengths h4 { color: var(--success); }
.swot-card.weaknesses h4 { color: var(--danger); }
.swot-card.opportunities h4 { color: var(--primary); }
.swot-card.threats h4 { color: var(--warning); }

.swot-card ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9375rem;
}

/* =============================================
   Loading Overlay
   ============================================= */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   Toast
   ============================================= */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--gray-900);
    color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1100;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--success);
    font-size: 1.25rem;
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
    body {
        background: white;
    }
    
    .header,
    .input-section,
    .report-header-bar,
    .loading-overlay,
    .toast {
        display: none !important;
    }
    
    .report-section {
        box-shadow: none;
        margin: 0;
    }
    
    .report-content {
        padding: 0;
    }
    
    .report-block {
        page-break-inside: avoid;
    }
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    .input-section {
        padding: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .report-header-bar {
        flex-direction: column;
        text-align: center;
    }
    
    .report-actions {
        width: 100%;
        justify-content: center;
    }
    
    .report-content {
        padding: 1.5rem;
    }
    
    .report-title h1 {
        font-size: 1.75rem;
    }
}
