/**
 * Modern CSS Styles for HLL Seeder Downloads
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --success: #10b981;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem 1rem;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.update-section {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.update-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.update-btn:hover:not(:disabled) {
    background: var(--surface-light);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.update-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.update-btn .icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    animation: none;
}

.update-btn:disabled .icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.update-status {
    font-size: 0.9rem;
    min-height: 1.5rem;
    transition: all 0.3s;
}

.update-status.updating {
    color: var(--primary-color);
}

.update-status.success {
    color: var(--success);
}

.update-status.error {
    color: #ef4444;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.1rem;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--shadow);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.info-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.toggle-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.info-header:hover .toggle-icon {
    color: var(--primary-color);
}

.info-header.active .toggle-icon {
    transform: rotate(180deg);
}

.info-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.8;
}

.info-content h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.info-content h3:first-child {
    margin-top: 0;
}

.info-content p {
    margin-bottom: 1rem;
}

.info-content ul, .info-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.info-content li {
    margin-bottom: 0.5rem;
}

.info-content code {
    background: var(--surface-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #60a5fa;
}

.info-content strong {
    color: var(--text-primary);
}

.files-container {
    position: relative;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

#files-list {
    display: grid;
    gap: 1.5rem;
}

.file-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.file-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
    border-color: var(--primary-color);
}

.file-card:hover::before {
    opacity: 1;
}

.file-card.latest {
    border-color: var(--success);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.file-card.latest::before {
    background: var(--success);
    opacity: 1;
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.file-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.latest-badge {
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--surface-light);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}

.file-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-date,
.download-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-comments {
    background: rgba(86, 156, 214, 0.1);
    border-left: 3px solid #569cd6;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.file-comments strong {
    color: #569cd6;
    margin-right: 0.5rem;
}

.icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.download-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.download-btn .icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .file-header {
        flex-direction: column;
    }
    
    .file-details {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-card {
    animation: fadeIn 0.3s ease-out;
}

