/* SparCollective Bio Page Styles */
/* German-focused, mobile-first responsive design */

:root {
    /* SparCollective Brand Colors (from remotion project) */
    --primary-color: #8E44AD;    /* Rich Purple */
    --monday-color: #C0392B;     /* Deep Red */
    --tuesday-color: #F39C12;    /* Bold Orange */
    --wednesday-color: #16A085;  /* Dark Teal */
    --thursday-color: #2980B9;   /* Steel Blue */
    --friday-color: #27AE60;     /* Forest Green */
    --saturday-color: #8E44AD;   /* Rich Purple */
    --sunday-color: #34495E;     /* Dark Slate */
    
    /* UI Colors */
    --background: #fafafa;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #e0e0e0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-elevated: 0 4px 12px rgba(0,0,0,0.15);
    
    /* Success/Error */
    --success: #27AE60;
    --error: #e74c3c;
    --warning: #f39c12;
    
    /* Typography */
    --font-primary: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Rubik One', 'Rubik', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Breakpoints */
    --mobile: 375px;
    --tablet: 768px;
    --desktop: 1024px;
}

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

body {
    font-family: var(--font-primary);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-xl);
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-lg);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    text-align: center;
    padding: var(--spacing-xl);
}

.error-state h3 {
    color: var(--error);
    margin-bottom: var(--spacing-md);
}

.error-state button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    margin-top: var(--spacing-md);
}

/* Container - Mobile First */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .content-wrapper {
        padding: 0 var(--spacing-lg);
    }
}

/* Profile Header */
.header-wrapper {
    background: #2c3e50;
    border-bottom: 2px solid #1a252f;
    width: 100%;
    margin-bottom: var(--spacing-lg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 767px) {
    .header-wrapper {
        margin-bottom: var(--spacing-md);
    }
}

.profile-header {
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 768px) {
    .profile-header {
        justify-content: center;
    }
}

.profile-image {
    margin-bottom: 0;
    flex-shrink: 0;
}

.profile-info {
    flex: 0 1 auto;
    min-width: 250px;
    text-align: left;
}

@media (min-width: 768px) {
    .profile-info {
        text-align: left;
    }
}

.profile-image img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255,255,255,0.1);
    padding: var(--spacing-xs);
    border: 1px solid rgba(255,255,255,0.2);
}

.logo {
    height: 40px;
    width: auto;
    margin-bottom: var(--spacing-sm);
}

.profile-header h1 {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
}

.bio {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    white-space: pre-line;
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.description {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
    margin-bottom: 0;
}

/* Static Links */
.static-links {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    justify-content: center;
}

@media (max-width: 767px) {
    .static-links {
        gap: var(--spacing-xs);
        margin-bottom: var(--spacing-md);
    }
}

.link-button {
    display: inline-flex;
    text-decoration: none;
    background: var(--surface);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    font-weight: 500;
    text-align: center;
    font-size: 0.9rem;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .link-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.85rem;
    }
}

.link-button:hover {
    background: var(--background);
    border-color: var(--text-secondary);
}

.link-button.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.link-button.primary:hover {
    opacity: 0.9;
}

/* Deals Section */
.deals-section {
    margin-bottom: var(--spacing-xl);
}

.deals-section > h2 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    text-align: left;
    font-weight: 600;
    line-height: 1.3;
}

.section-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: left;
    margin-bottom: var(--spacing-lg);
    line-height: 1.4;
}

.deals-group {
    margin-bottom: var(--spacing-lg);
}

.deals-group h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    line-height: 1.3;
}

/* Day Groups */
.day-group {
    margin-bottom: var(--spacing-lg);
    background: var(--surface);
    border-radius: 8px;
    padding: var(--spacing-md);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-left: 4px solid var(--primary-color);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
}

.day-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.deal-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

.day-deals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-md);
}

@media (max-width: 767px) {
    .day-deals {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: var(--spacing-sm);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .day-deals {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 1024px) {
    .day-deals {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* Deal Cards */
.deal-card {
    background: var(--surface);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.deal-card:hover {
    border-color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.deal-card.featured {
    border-color: var(--primary-color);
}

.deal-image {
    position: relative;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    background: #f5f5f5;
    overflow: hidden;
}

.deal-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--spacing-sm);
}

.discount-badge {
    position: absolute;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
    background: var(--error);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.deal-content {
    padding: var(--spacing-sm);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.deal-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.deal-retailer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deal-pricing {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.original-price {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.deal-link {
    display: block;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.deal-link:hover {
    opacity: 0.9;
}

/* Archive Section */
.archive {
    border-top: 1px solid var(--border);
    padding-top: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.toggle-archive {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    width: auto;
    margin: 0 auto var(--spacing-md);
    transition: all 0.2s ease;
    display: block;
}

.toggle-archive:hover {
    background: var(--background);
    border-color: var(--text-secondary);
}

/* No Deals State */
.no-deals {
    text-align: center;
    color: var(--text-secondary);
    padding: var(--spacing-lg);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--border);
    margin-top: var(--spacing-2xl);
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.disclaimer {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
    line-height: 1.6;
}

.legal-links {
    margin-top: var(--spacing-md);
}

.legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.legal-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-links .separator {
    color: var(--text-muted);
    margin: 0 var(--spacing-sm);
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    body {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    .container {
        padding: 0;
    }
    
    .content-wrapper {
        padding: 0 var(--spacing-sm);
    }
    
    .profile-header {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .profile-header h1 {
        font-size: 1.2rem;
    }
    
    .bio {
        font-size: 0.85rem;
    }
    
    .description {
        font-size: 0.8rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .static-links {
        margin-bottom: var(--spacing-md);
        gap: var(--spacing-xs);
    }
    
    .link-button {
        font-size: 0.85rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .deals-section > h2 {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .section-description {
        font-size: 0.8rem;
        margin-bottom: var(--spacing-md);
    }
    
    .deals-group {
        margin-bottom: var(--spacing-md);
    }
    
    .deals-group h3 {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .day-header {
        margin-bottom: var(--spacing-sm);
        padding: var(--spacing-xs) 0;
    }
    
    .day-title {
        font-size: 0.9rem;
    }
    
    .deal-count {
        font-size: 0.75rem;
    }
    
    .deal-content {
        padding: var(--spacing-xs);
    }
    
    .deal-title {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
    
    .deal-retailer {
        font-size: 0.7rem;
    }
    
    .original-price {
        font-size: 0.7rem;
    }
    
    .current-price {
        font-size: 0.95rem;
    }
    
    .deal-pricing {
        margin-bottom: var(--spacing-xs);
    }
    
    .deal-link {
        font-size: 0.8rem;
        padding: 6px var(--spacing-xs);
    }
    
    .footer {
        padding: var(--spacing-md) 0;
        margin-top: var(--spacing-lg);
    }
    
    .disclaimer {
        font-size: 0.75rem !important;
    }
    
    .legal-links a {
        font-size: 0.8rem;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #1a1a1a;
        --surface: #2d2d2d;
        --surface-elevated: #363636;
        --text-primary: #ffffff;
        --text-secondary: #b0b0b0;
        --text-muted: #888888;
        --border: #404040;
    }
}