/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0891B2;
    --primary-dark: #0E7490;
    --primary-light: #22D3EE;
    --secondary: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --bg-primary: #FFFFFF;
    --bg-secondary: #FAFBFC;
    --bg-tertiary: #F3F4F6;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow: rgba(0, 0, 0, 0.03);
    --shadow-md: rgba(0, 0, 0, 0.06);
    --shadow-lg: rgba(0, 0, 0, 0.1);
    --accent: #0EA5E9;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #F9FAFB;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 2rem 1rem;
}

@media (max-width: 640px) {
    body {
        padding: 0;
        margin: 0;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    border: 1px solid var(--border);
}

@media (max-width: 640px) {
    .container {
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }
}

/* Header */
header {
    background: linear-gradient(135deg, #0891B2 0%, #0E7490 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="1" fill="white" fill-opacity="0.08"/></svg>');
    opacity: 0.4;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    margin-bottom: 0.625rem;
}

.logo-icon {
    font-size: 40px;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
    border-radius: 8px;
}

.logo h1 {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.92;
    font-weight: 400;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.website-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.website-link:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Main Content */
main {
    padding: 0;
}

/* Card Styles */
.card {
    background: var(--bg-primary);
    border: none;
    border-radius: 0;
    padding: 2rem;
    margin-bottom: 0;
    box-shadow: none;
}

.device-config {
    border-bottom: 1px solid var(--border-light);
    padding: 2rem;
}

@media (max-width: 768px) {
    .card {
        padding: 1rem 0.75rem;
    }
    
    .device-config {
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 0.75rem 0.375rem;
    }
    
    .device-config {
        padding: 0.75rem 0.375rem;
    }
    
    .card h2,
    .device-config h2 {
        margin-left: 0;
        margin-right: 0;
    }
}

.card h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

/* Device Configuration */
.device-config h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
}

.device-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.selector-item {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.selector-item label {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}

.selector-item label svg {
    color: var(--primary);
    flex-shrink: 0;
    display: block;
}

.chip-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chip-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 0.375rem;
    font-family: 'Courier New', monospace;
}

.btn-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.btn-link:hover {
    color: var(--primary);
    background: var(--bg-secondary);
    border-color: var(--primary);
}

.btn-link i {
    flex-shrink: 0;
    font-size: 14px;
}

.selector-info {
    margin-top: -0.5rem;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid #BAE6FD;
    border-radius: 0.5rem;
}

.info-card i {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 0.125rem;
    font-size: 16px;
}

.info-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.custom-chip-selector {
    padding: 1.25rem;
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-left: 4px solid var(--warning);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.override-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.override-warning i {
    flex-shrink: 0;
    color: var(--warning);
    font-size: 20px;
}

.override-warning strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.override-warning p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.custom-chip-selector label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
    .selector-primary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Instructions */
.instructions ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.instructions li {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #F0F9FF;
    border-left: 4px solid var(--accent);
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.note svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.note svg path {
    fill: var(--accent);
}

.note span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Device Selector */
.device-selector {
    margin-top: 1.5rem;
}

.device-selector label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.device-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.device-select:hover {
    border-color: var(--primary);
}

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

.device-select option {
    padding: 0.5rem;
}

/* Custom Rich Dropdown */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
    text-align: left;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.custom-select-trigger:hover {
    border-color: var(--primary);
}

.custom-select-trigger:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.custom-select-trigger i {
    position: absolute;
    right: 1rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
    font-size: 14px;
}

.custom-select.active .custom-select-trigger i {
    transform: rotate(180deg);
}

.custom-select-value {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

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

.select-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-select.active .custom-select-dropdown {
    display: block;
}

.custom-select-option {
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: var(--bg-secondary);
}

.custom-select-option.selected {
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    border-left: 3px solid var(--primary);
}

.option-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.option-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.custom-select-option.selected .option-title {
    color: var(--primary);
}

/* Chip Family Section */
.chip-family-section {
    padding: 1rem;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border: 2px solid var(--primary);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chip-family-required {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    border-left: 4px solid var(--primary);
}

.chip-family-required i {
    color: var(--primary);
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.chip-family-required strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.chip-family-required p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.chip-family-section label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chip-family-section label i {
    color: var(--primary);
}

.chip-family-select {
    border: 2px solid var(--primary);
    font-weight: 500;
}

/* Chip Family Info */
.chip-family-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.chip-family-info > label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.chip-badge {
    display: inline;
    padding: 0.125rem 0.25rem;
    background: var(--bg-primary);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.custom-chip-selector {
    margin-top: 1rem;
    padding: 1rem;
    background: #FEF3C7;
    border-radius: 0.5rem;
    border: 2px solid #FCD34D;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-chip-selector label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.help-text {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.help-text strong {
    color: var(--danger);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .section-header {
        margin-bottom: 1rem;
    }
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 18px;
}

.btn-icon:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-icon i {
    flex-shrink: 0;
}

.section-header h2 {
    margin-bottom: 0;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Buttons */
button, a.btn-secondary, a.btn-primary {
    cursor: pointer;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 1px 3px rgba(8, 145, 178, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: var(--text-secondary);
}

/* Releases Grid */
.releases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.75rem;
}

.release-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px var(--shadow);
    position: relative;
    display: flex;
    flex-direction: column;
}

.release-card:hover {
    border-color: var(--text-tertiary);
    box-shadow: 0 2px 4px var(--shadow-md);
}

.release-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.release-title {
    flex: 1;
    min-width: 0;
}

.release-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.release-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Monaco', 'Courier New', Courier, monospace;
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
}

.release-badge {
    padding: 0.25rem 0.625rem;
    background: var(--secondary);
    color: white;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.release-date {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.release-changelog {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.changelog-preview,
.changelog-full {
    padding: 1rem;
    background: linear-gradient(to bottom right, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 0.625rem;
    border: 1px solid #E2E8F0;
    border-left: 3px solid var(--accent);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.changelog-full {
    max-height: 400px;
    overflow-y: auto;
}

.changelog-full::-webkit-scrollbar {
    width: 6px;
}

.changelog-full::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 3px;
}

.changelog-full::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

.changelog-full::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.changelog-toggle {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--accent);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.375rem 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.changelog-toggle:hover {
    color: var(--primary-dark);
    transform: translateX(2px);
}

.changelog-toggle::after {
    content: '→';
    font-size: 0.875rem;
    transition: transform 0.2s;
}

.changelog-toggle:hover::after {
    transform: translateX(2px);
}

.btn-text {
    background: none;
    padding: 0.25rem 0.5rem;
}

.release-assets {
    margin-bottom: 1rem;
}

.release-assets-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.asset-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.asset-item {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    padding: 0.25rem 0.5rem;
    background: var(--bg-primary);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.asset-item svg {
    flex-shrink: 0;
}

.release-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.release-actions button,
.release-actions a {
    flex: 1;
    justify-content: center;
    font-weight: 500;
    transition: all 0.15s ease;
    min-width: 0;
}

.release-actions .btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-icon-text {
    display: inline-flex !important;
    align-items: center;
    gap: 0.375rem;
}

.btn-text-label {
    display: inline;
    white-space: nowrap;
}

.release-actions .btn-primary {
    background: var(--primary);
}

.release-actions .btn-primary:hover {
    background: var(--primary-dark);
}

.release-actions .btn-secondary {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.release-actions .btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px dashed var(--border);
}

@media (max-width: 640px) {
    .empty-state {
        padding: 2rem 1rem;
    }
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 1rem;
    opacity: 0.4;
    color: #9CA3AF;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    max-width: 400px;
}

/* ESP Web Tools Button Customization */
esp-web-install-button {
    --esp-tools-button-color: var(--primary);
    --esp-tools-button-text-color: white;
}

/* Build Info Section */
.build-info {
    background: var(--bg-primary);
}

.build-explanation {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.build-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.build-method {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px var(--shadow);
}

.build-method h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.build-method h3 i {
    font-size: 20px;
    color: var(--primary);
}

.build-target-badge {
    display: inline;
    padding: 0.125rem 0.375rem;
    background: var(--bg-primary);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    font-family: 'Courier New', monospace;
}

.build-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border: 1px solid #FED7AA;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #9A3412;
    margin-bottom: 1rem;
}

.build-note i {
    color: #EA580C;
    font-size: 16px;
    flex-shrink: 0;
}



.build-method p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.build-command {
    display: block;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: auto;
    margin-top: 0.5rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

footer .espa-link {
    color: var(--primary);
    font-size: 1.1em;
}

.config-info {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    header {
        padding: 2rem 1rem;
    }

    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo-icon {
        font-size: 32px;
    }

    .logo h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    main {
        padding: 0;
    }

    .card {
        padding: 0.75rem 0.5rem;
        margin-bottom: 0;
    }

    .card h2 {
        font-size: 1.125rem;
    }

    .releases-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .btn-secondary {
        flex: 1;
    }

    .blade-panel {
        max-width: 100%;
    }

    .blade-header {
        padding: 1.5rem;
    }

    .blade-header h3 {
        font-size: 1.25rem;
    }

    .blade-content {
        padding: 1.5rem;
    }
}

/* Changelog Blade */
.changelog-blade {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.changelog-blade.active {
    pointer-events: all;
    opacity: 1;
}

.blade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.blade-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 600px;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.changelog-blade.active .blade-panel {
    transform: translateX(0);
}

.blade-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, #F8FAFC 0%, #F0F9FF 100%);
    gap: 1rem;
}

@media (max-width: 640px) {
    .blade-header {
        padding: 1.25rem 1rem;
    }
}

.blade-title-section {
    flex: 1;
    min-width: 0;
}

.blade-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blade-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.blade-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: 'Courier New', Courier, monospace;
    background: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: 1px solid var(--border);
}

.blade-close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.blade-close:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
    transform: scale(1.05);
}

.blade-close i {
    color: var(--text-secondary);
    font-size: 20px;
}

.blade-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

@media (max-width: 640px) {
    .blade-content {
        padding: 1rem 0.5rem;
    }
}

.blade-content::-webkit-scrollbar {
    width: 8px;
}

.blade-content::-webkit-scrollbar-track {
    background: #F1F5F9;
}

.blade-content::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.blade-content::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.blade-date {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
}

.blade-date::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--text-tertiary);
    border-radius: 50%;
}

.blade-changelog {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.blade-changelog h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.blade-changelog h1:first-child {
    margin-top: 0;
}

.blade-changelog h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.75rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.blade-changelog h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
}

.blade-changelog h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.25rem 0 0.5rem 0;
}

.blade-changelog p {
    margin: 0.75rem 0;
    color: var(--text-secondary);
}

.blade-changelog ul {
    margin: 1rem 0;
    padding-left: 0;
    list-style: none;
}

.blade-changelog ul li {
    position: relative;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.blade-changelog ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2em;
}

.blade-changelog ol {
    margin: 1rem 0;
    padding-left: 1.75rem;
    list-style: decimal;
}

.blade-changelog ol li {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    padding-left: 0.5rem;
}

.blade-changelog code {
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.blade-changelog pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border);
}

.blade-changelog pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 0.875rem;
    line-height: 1.6;
}

.blade-changelog a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.blade-changelog a:hover {
    border-bottom-color: var(--primary);
}

.blade-changelog blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
}

.blade-changelog hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 2rem 0;
}

.blade-changelog strong {
    color: var(--text-primary);
    font-weight: 600;
}

.blade-changelog em {
    font-style: italic;
}

/* Flash Dialog Modal */
.flash-dialog {
    border: none;
    border-radius: 0.75rem;
    padding: 0;
    max-width: 500px;
    width: calc(100% - 2rem);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.flash-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.flash-dialog-content {
    padding: 0;
}

.flash-dialog-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.flash-dialog-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.flash-dialog-icon svg {
    color: white;
}

.flash-dialog-header h2 {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.flash-dialog-close {
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    background: transparent;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    flex-shrink: 0;
}

.flash-dialog-close:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

.flash-dialog-close svg {
    color: var(--text-secondary);
}

.flash-dialog-description {
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}

.flash-dialog-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    justify-content: flex-end;
}

.flash-dialog-button-container {
    display: flex;
}

.flash-dialog-button-container esp-web-install-button {
    display: flex;
}

/* Style ESP Web Tools button to match our design system */
.flash-dialog-button-container esp-web-install-button::part(button) {
    min-width: 140px !important;
    background: var(--primary) !important;
    color: white !important;
    border: 1px solid transparent !important;
    border-radius: 0.375rem !important;
    padding: 0.5rem 1rem !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    height: 38px !important;
    box-sizing: border-box !important;
}

.flash-dialog-button-container esp-web-install-button::part(button):hover {
    background: var(--primary-dark) !important;
    box-shadow: 0 1px 3px rgba(8, 145, 178, 0.3) !important;
}

.flash-dialog-button-container esp-web-install-button::part(button):active {
    transform: scale(0.98) !important;
}

.flash-dialog-footer > button {
    min-width: 140px;
    height: 38px;
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Flash Progress Styles */
.flash-progress {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin: 1rem 0;
}

@media (max-width: 640px) {
    .flash-progress {
        padding: 0.75rem 0.5rem;
        margin: 0.5rem 0;
    }
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.progress-header i {
    color: var(--primary);
    font-size: 1.125rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-details {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.progress-error {
    text-align: center;
    color: var(--danger);
}

.progress-error i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.progress-error strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

/* Flash Success Styles */
.flash-success {
    text-align: center;
    padding: 2rem 1.5rem;
}

@media (max-width: 640px) {
    .flash-success {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 640px) {
    .flash-success {
        padding: 1.5rem 1rem;
    }
}

.success-icon {
    font-size: 3.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.flash-success h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.flash-success p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.success-actions button {
    min-width: 180px;
}

.flash-dialog-button-container .btn-primary {
    min-width: 140px;
    height: 38px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Load More Container */
.load-more-container {
    display: flex;
    justify-content: center;
    padding: 2rem 0 1rem 0;
}

.load-more-container button {
    min-width: 200px;
}



/* Help Blade */
.help-blade .blade-panel {
    max-width: 600px;
}

.help-section {
    margin-bottom: 2.5rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.help-section > p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.help-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.help-steps li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9375rem;
}

.step-content {
    flex: 1;
    padding-top: 0.25rem;
}

.step-content strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.step-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.browser-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.browser-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    padding: 0.625rem 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.browser-list svg {
    flex-shrink: 0;

.browser-list i {
    flex-shrink: 0;
    color: #0891B2;
    font-size: 20px;
}

}

.help-note {
    padding: 0.875rem 1rem;
    background: #F0F9FF;
    border-left: 3px solid var(--accent);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.troubleshooting-item {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.troubleshooting-item:last-child {
    margin-bottom: 0;
}

.troubleshooting-item strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.troubleshooting-item p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.troubleshooting-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.troubleshooting-item a:hover {
    text-decoration: underline;
}

/* Help Blade */
.help-blade .blade-panel {
    max-width: 600px;
}

.help-section {
    margin-bottom: 2.5rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.help-section > p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.help-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.help-steps li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9375rem;
}

.step-content {
    flex: 1;
    padding-top: 0.25rem;
}

.step-content strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.step-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.browser-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.browser-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    padding: 0.625rem 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.browser-list svg {
    flex-shrink: 0;
}

.help-note {
    padding: 0.875rem 1rem;
    background: #F0F9FF;
    border-left: 3px solid var(--accent);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.troubleshooting-item {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.troubleshooting-item:last-child {
    margin-bottom: 0;
}

.troubleshooting-item strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.troubleshooting-item p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.troubleshooting-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.troubleshooting-item a:hover {
    text-decoration: underline;
}

.browser-list i {
    flex-shrink: 0;
    color: #0891B2;
    font-size: 20px;
}

/* Custom Binary Upload Section */
.custom-binary-section {
    background: var(--bg-primary);
}

.custom-binary-section h2 {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.custom-binary-section h2 i {
    color: var(--primary);
}

.custom-binary-upload {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.upload-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-section h3 i {
    color: var(--primary);
    font-size: 18px;
}

.file-upload-area {
    position: relative;
}

.file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    background: white;
    border: 2px dashed var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 120px;
}

.file-label:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.file-input:focus + .file-label {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.file-label i {
    font-size: 32px;
    color: var(--text-tertiary);
}

.file-label:hover i {
    color: var(--primary);
}

.file-label span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

.file-label.has-file {
    border-color: var(--primary);
    background: white;
}

.file-label.has-file i {
    color: var(--primary);
}

.file-label.has-file span {
    color: var(--text-primary);
    font-weight: 600;
}

.upload-info {
    margin-bottom: 1.5rem;
}

.upload-actions {
    display: flex;
    justify-content: center;
}

.upload-actions .btn-primary {
    min-width: 200px;
}

.upload-actions .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    padding: 0 2rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .tab-navigation {
        padding: 0 0.5rem;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .tab-navigation {
        padding: 0 0.25rem;
    }
}

.tab-btn {
    padding: 1rem 1.75rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    white-space: nowrap;
    position: relative;
    border-radius: 0;
}

@media (max-width: 768px) {
    .tab-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .tab-btn {
        padding: 0.75rem 0.625rem;
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
        min-width: 0;
        flex: 1;
    }
    
    .tab-btn span {
        display: block;
        font-size: 0.6875rem;
        line-height: 1;
    }
    
    .tab-btn i {
        font-size: 1.25rem;
    }
    
    .tab-navigation {
        gap: 0.125rem;
    }
}

.tab-btn i {
    font-size: 1rem;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(8, 145, 178, 0.04);
}

.tab-btn:hover i {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
    background: var(--bg-primary);
}

.tab-btn.active i {
    color: var(--primary);
}

/* Tab Panels */
.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease;
    min-height: 400px;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-panel > section:first-child {
    margin-top: 0;
    border-radius: 0;
}