/* Reset et variables CSS */
:root {
    --primary-color: #6366f1;
    --primary-hover: #5b5fcf;
    --secondary-color: #64748b;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --radius: 0.5rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    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: var(--text-primary);
    background-color: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-content {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
}

.subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

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

.btn-primary:hover {
    background-color: #f1f5f9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
}

.btn-icon:hover {
    background-color: var(--surface);
}

/* Filters */
.filters {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag:hover, .tag.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Versions Grid */
.versions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.version-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.version-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.version-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.version-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumbnail {
    font-size: 3rem;
    color: var(--text-secondary);
}

.version-info {
    padding: 1.5rem;
}

.version-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.version-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.version-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.version-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.version-tags {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.version-tag {
    padding: 0.125rem 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.75rem;
    font-size: 0.625rem;
}

/* Compare View */
.compare-view {
    animation: fadeIn 0.3s ease;
}

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

.compare-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.compare-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.version-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    min-width: 200px;
}

.compare-frames {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    height: calc(100vh - 300px);
    min-height: 600px;
}

.frame-container {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
}

.frame-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
}

.frame-header span {
    font-weight: 500;
    font-size: 0.875rem;
}

.frame-controls {
    display: flex;
    gap: 0.5rem;
}

.compare-frame {
    width: 100%;
    height: calc(100% - 50px);
    border: none;
    background: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: 2rem;
}

.help-text {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.help-text h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.help-text pre {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    overflow-x: auto;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    background-color: var(--surface);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.version-card {
    animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .header-actions {
        justify-content: center;
        align-self: stretch;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: auto;
    }
    
    .compare-frames {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 800px;
    }
    
    .compare-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .compare-controls {
        justify-content: center;
    }
    
    .version-select {
        min-width: auto;
        flex: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .versions-grid {
        grid-template-columns: 1fr;
    }
    
    .logo {
        font-size: 2rem;
    }
}

.compare-mode-mobile .compare-frames {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
}

.compare-mode-mobile .frame-container {
    width: 100%;
    max-width: 400px;
    flex: 0 0 auto;
}

.compare-mode-mobile .compare-frame {
    width: 100%;
    min-width: 320px;
    max-width: 400px;
    height: 700px;
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    border: 1px solid #e2e8f0;
}

.compare-mode-desktop {
    position: relative;
}

.compare-mode-desktop .compare-header {
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    padding: 0 1rem;
}

.compare-mode-desktop .compare-frames {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    height: calc(100vh - 300px);
    min-height: 600px;
    padding: 0 1rem;
}

.compare-mode-desktop .frame-container {
    width: 100%;
    max-width: none;
}

.compare-mode-desktop .compare-frame {
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: none;
    border-radius: 0.5rem;
    box-shadow: none;
    border: 1px solid #e2e8f0;
} 