* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.8;
    background-color: #f8f9fa;
    color: #333;
    margin: 0;
    padding: 10px;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    body {
        padding: 20px;
    }
}

/* Global layout width for coherence */
body > header,
body > .layout {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

header {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

@media (min-width: 768px) {
    header {
        padding: 20px;
        margin-bottom: 20px;
    }
}

header img {
    max-width: 100%;
    height: auto;
}

@media (min-width: 768px) {
    header img {
        max-width: 500px;
    }
}

.auth-banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 16px auto 0;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: #f1f5ff;
    border: 1px solid #cfe0ff;
    width: fit-content;
    font-size: 14px;
}

@media (min-width: 768px) {
    .auth-banner {
        flex-direction: row;
        gap: 12px;
        width: fit-content;
    }
}

.auth-banner span {
    font-weight: 500;
}

.auth-banner button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    width: 100%;
    min-height: 44px;
    font-size: 16px;
}

@media (min-width: 768px) {
    .auth-banner button {
        width: auto;
        padding: 8px 16px;
        min-height: auto;
        font-size: 14px;
    }
}

.auth-banner button:hover:not(:disabled) {
    background-color: #0056b3;
}

.auth-banner button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}


/* URL input row */
.url-input-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .url-input-container {
        grid-template-columns: 1fr auto;
        max-width: 700px;
    }
}

.url-input-container h3 {
    grid-column: 1 / -1;
    margin-bottom: 4px;
    font-size: 16px;
}

.url-input-container input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px; /* Prevents zoom on iOS */
    width: 100%;
    min-height: 44px;
}

.url-input-container button {
    padding: 12px 20px;
    border: none;
    background-color: #007bff;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    min-height: 44px;
    font-size: 16px;
}

@media (min-width: 768px) {
    .url-input-container button {
        width: auto;
        padding: 10px 14px;
        min-height: auto;
        font-size: 14px;
    }
}

.url-input-container button:hover {
    background-color: #0056b3;
}

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #fafafa;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .drop-zone {
        padding: 32px;
        margin-top: 20px;
    }
}

.drop-zone.dragover {
    border-color: #007bff;
    background-color: #e7f3ff;
    transform: scale(1.01);
}

.drop-zone-content svg {
    color: #007bff;
    margin-bottom: 12px;
    opacity: 0.7;
}

.drop-zone-content p {
    margin: 8px 0;
    color: #666;
}

.drop-zone-or {
    font-size: 12px;
    color: #999;
    margin: 12px 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-input-label {
    display: inline-block;
    padding: 14px 24px;
    background-color: #007bff;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    min-height: 44px;
    font-size: 16px;
    width: 100%;
    text-align: center;
}

@media (min-width: 768px) {
    .file-input-label {
        width: auto;
        padding: 10px 24px;
        font-size: 14px;
        min-height: auto;
    }
}

.file-input-label:hover {
    background-color: #0056b3;
}

/* Compact PNG file input label */
.file-input-label-png {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .file-input-label-png {
        padding: 6px 14px;
        font-size: 13px;
        min-height: 32px;
    }
}

/* Control panel */
.control-panel {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

@media (min-width: 768px) {
    .control-panel {
        padding: 16px 20px;
        margin-bottom: 20px;
    }
}

.control-row {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .control-row {
        flex-direction: row;
    }
}

.control-row + .control-row {
    margin-top: 12px;
}

.control-row input,
.control-row select,
.control-row button {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px; /* Prevents zoom on iOS */
    background-color: #fff;
    min-height: 44px;
    width: 100%;
}

@media (min-width: 768px) {
    .control-row input,
    .control-row select,
    .control-row button {
        padding: 8px 12px;
        font-size: 14px;
        min-height: auto;
        width: auto;
    }
}

.control-row input[type="search"] {
    flex: 1 1 100%;
}

@media (min-width: 768px) {
    .control-row input[type="search"] {
        flex: 1 1 240px;
        min-width: 200px;
    }
}

.control-row select {
    width: 100%;
}

@media (min-width: 768px) {
    .control-row select {
        min-width: 180px;
        width: auto;
    }
}

.control-row button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, transform 0.1s;
    flex: 1 1 auto;
}

@media (min-width: 768px) {
    .control-row button {
        flex: 0 1 auto;
    }
}

.control-row button:hover:not(:disabled) {
    background-color: #0056b3;
}

.control-row button:active:not(:disabled) {
    transform: translateY(1px);
}

.control-row button:disabled {
    background-color: #d5d9df;
    color: #7a848f;
    cursor: not-allowed;
}

.search-results {
    margin-top: 14px;
    font-size: 13px;
    color: #666;
    min-height: 18px;
}

.layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 1024px) {
    .layout {
        grid-template-columns: 1fr 300px;
        gap: 20px;
    }
}

main {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    order: 1;
}

@media (min-width: 768px) {
    main {
        padding: 20px;
    }
}

@media (min-width: 1024px) {
    main {
        padding: 30px;
        order: 0;
    }
}

.sidebar {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    max-height: none;
    overflow-y: visible;
    position: relative;
    order: 0;
}

@media (min-width: 1024px) {
    .sidebar {
        padding: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        position: sticky;
        top: 20px;
        order: 1;
    }
}

.sidebar h3 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.sidebar-header {
    display: none;
}

.sidebar-content {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

@media (max-width: 767px) {
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        font-size: 16px;
        font-weight: 600;
        padding: 12px 0;
        border-bottom: 2px solid #007bff;
        margin-bottom: 0;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.2);
        min-height: 44px;
        position: relative;
        z-index: 10;
    }
    
    .sidebar-header .sidebar-toggle-icon {
        font-size: 12px;
        color: #007bff;
        transition: transform 0.3s ease;
    }
    
    .sidebar.collapsed .sidebar-header .sidebar-toggle-icon {
        transform: rotate(-90deg);
    }
    
    .sidebar-content {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        padding-top: 0;
        margin-top: 0;
    }
    
    .sidebar:not(.collapsed) .sidebar-content {
        max-height: 5000px;
        opacity: 1;
        padding-top: 15px;
        margin-top: 0;
    }
    
    .stats .stats-title {
        display: none;
    }
}

@media (min-width: 768px) {
    .sidebar-header {
        display: none;
    }
    
    .sidebar-content {
        max-height: none !important;
        opacity: 1 !important;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
}

.sidebar section {
    margin-bottom: 20px;
}

/* Simple rows for stats */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}

.stat-row strong {
    color: #007bff;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.stat-item {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.stat-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
}

.legend {
    max-height: 300px;
    overflow-y: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 123, 255, 0.2);
    user-select: none;
    -webkit-user-select: none;
}

.legend-item:hover {
    background-color: #f8f9fa;
}

.legend-item.active {
    background-color: #e7f3ff;
    border: 2px solid #007bff;
}

.legend-color {
    width: 30px;
    height: 3px;
    flex-shrink: 0;
}

.legend-tag {
    font-weight: bold;
    min-width: 50px;
}

.legend-desc {
    color: #666;
    font-size: 11px;
}

.legend-count {
    margin-left: auto;
    color: #999;
    font-size: 11px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.filter-tag {
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    border: 2px solid transparent;
}

.filter-tag.active {
    background-color: #007bff;
    color: white;
}

p {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    p {
        margin-bottom: 20px;
        font-size: inherit;
        line-height: 1.8;
    }
}

.token-container {
    position: relative;
    display: inline-block;
    cursor: help;
    /* Make tokens more tappable on mobile */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 123, 255, 0.2);
}

.token-word {
    border-bottom-width: 3px;
    border-bottom-style: solid;
    padding-bottom: 1px;
}

.token-word.filtered-out {
    opacity: 0.2;
}

.token-word.highlight {
    background-color: #FFD700;
    color: #333;
}

.token-popup {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    width: 240px;
    background-color: #222;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    font-size: 13px;
    font-family: monospace;
    line-height: 1.5;
    position: absolute;
    z-index: 1000; /* Higher z-index for mobile to ensure visibility */
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    /* Prevent popup from being selectable */
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none; /* Allow clicks to pass through to document */
}

.token-popup::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #222 transparent transparent transparent;
}

/* Arrow when popup appears below the word (on mobile) */
.token-popup.popup-below::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent #222 transparent;
}

.token-popup-line {
    display: block;
    margin-bottom: 4px;
}

.token-popup-line strong {
    color: #89ddff;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Error banner for unified feedback */
#errorBanner {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

.toast.error {
    background-color: #dc3545;
}

.pos-distribution {
    margin-top: 15px;
}

.bar-chart {
    margin-top: 10px;
}

.bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 11px;
    gap: 6px;
}

.bar-label {
    width: 45px;
    font-weight: bold;
    flex-shrink: 0;
}

.bar-container {
    flex: 1;
    background-color: #f0f0f0;
    border-radius: 3px;
    height: 18px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background-color: #007bff;
    border-radius: 3px;
    transition: width 0.3s;
}

.bar-value {
    color: #666;
    min-width: 30px;
    text-align: right;
    flex-shrink: 0;
}

/* Word Frequency List Styles */
.word-frequency {
    margin-bottom: 24px;
}

.frequency-controls {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toggle-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-btn:hover {
    background-color: #e9ecef;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.15);
}

.toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.toggle-btn.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #fff;
}

.frequency-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background-color: #fafafa;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f1f5f9;
}

/* Custom scrollbar styling for webkit browsers */
.frequency-list::-webkit-scrollbar {
    width: 8px;
}

.frequency-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.frequency-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
    transition: background 0.2s;
}

.frequency-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.frequency-item {
    display: grid;
    grid-template-columns: 35px 1fr 55px 55px;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 123, 255, 0.2);
    user-select: none;
    -webkit-user-select: none;
}

.frequency-item:hover {
    background-color: #e7f3ff;
    border-left-color: #007bff;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.frequency-item:active {
    transform: translateX(1px);
}

.frequency-item.selected {
    background-color: #e7f3ff;
    border-left-color: #007bff;
    border-left-width: 4px;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

.frequency-item.selected .frequency-word {
    color: #007bff;
    font-weight: 600;
}

.frequency-item.selected .frequency-count {
    color: #0056b3;
}

.frequency-item.selected::before {
    opacity: 0.5;
}

.frequency-rank {
    color: #6c757d;
    font-size: 12px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.frequency-word {
    font-weight: 500;
    color: #212529;
    border-bottom: 2px solid;
    padding-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.frequency-item:hover .frequency-word {
    color: #007bff;
}

.frequency-count {
    color: #007bff;
    font-weight: 600;
    text-align: right;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.frequency-percentage {
    color: #6c757d;
    font-size: 12px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Subtle frequency indicator bar */
.frequency-item::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 0 0 4px 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.frequency-item:hover::before {
    opacity: 0.3;
}

.token-word.highlight-frequency {
    background-color: #fff3cd;
    border-bottom-color: #ffc107 !important;
    border-bottom-width: 4px !important;
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
    animation: highlightPulse 0.6s ease-out;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.6);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.3);
    }
    100% {
        box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
    }
}

@media (max-width: 767px) {
    .word-frequency {
        margin-bottom: 20px;
    }
    
    .frequency-list {
        max-height: 300px;
        padding: 8px;
    }
    
    .frequency-item {
        grid-template-columns: 28px 1fr 48px 48px;
        gap: 8px;
        padding: 8px 8px;
        font-size: 12px;
        margin-bottom: 5px;
        /* Disable filtering interactions on mobile - show data only */
        pointer-events: none;
        cursor: default;
        opacity: 0.9;
    }
    
    .frequency-item:hover {
        background-color: #fff;
        border-left-color: transparent;
        transform: none;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    }
    
    .frequency-item:active {
        transform: none;
    }
    
    .frequency-rank {
        font-size: 11px;
    }
    
    .frequency-count {
        font-size: 13px;
    }
    
    .frequency-percentage {
        font-size: 11px;
    }
    
    .toggle-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    /* Disable filtering interactions on mobile - show data only */
    .legend-item {
        pointer-events: none;
        cursor: default;
        opacity: 0.85;
    }
    
    .legend-item:hover {
        background-color: transparent;
    }
}

.view-options {
    margin-top: 10px;
}

.view-options label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
}

.view-options input[type="range"] {
    width: 100%;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    body {
        -webkit-font-smoothing: antialiased;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Fix input zoom on iOS */
    input[type="text"],
    input[type="search"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on focus */
    }
    
    /* Better touch targets for iOS */
    button,
    .file-input-label {
        min-height: 44px; /* Apple's recommended touch target size */
        min-width: 44px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    /* Fix sticky positioning on iOS */
    .sidebar {
        position: -webkit-sticky;
        position: sticky;
    }
    
    /* Prevent text selection issues on iOS */
    .token-word {
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Fix overflow scrolling on iOS */
    .sidebar {
        -webkit-overflow-scrolling: touch;
    }
}

/* Additional mobile optimizations */
@media (max-width: 767px) {
    /* Improve touch targets */
    .token-container {
        min-height: 32px;
        padding: 2px 0;
        cursor: pointer; /* Show pointer cursor on mobile to indicate clickability */
    }
    
    /* Better popup styling on mobile */
    .token-popup {
        width: 90%;
        max-width: 280px;
        min-width: 240px;
        font-size: 12px;
        padding: 12px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
        /* Ensure popup stays on screen */
        max-height: 200px;
        overflow-y: auto;
    }
    
    .token-popup-line {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    /* Better spacing for mobile */
    .sidebar section {
        margin-bottom: 15px;
    }
    
    /* Compact stats on mobile */
    .stat-row {
        padding: 8px 0;
        font-size: 13px;
    }
    
    /* Better legend on mobile */
    .legend-item {
        padding: 8px 4px;
        font-size: 11px;
    }
    
    /* Improve control actions on mobile */
    .control-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .control-actions button {
        font-size: 14px;
        padding: 10px;
    }
    
    /* Better drop zone text on mobile */
    .drop-zone-content p {
        font-size: 14px;
        margin: 6px 0;
    }
    
    /* Improve header text on mobile */
    header p {
        font-size: 13px;
        margin-bottom: 12px;
    }
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    bottom: -2px;
}

.tab-button:hover {
    color: #333;
    background-color: #f5f5f5;
}

.tab-button.active {
    color: #4363d8;
    border-bottom-color: #4363d8;
    font-weight: 600;
}

.tab-content {
    display: none;
}

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

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.download-btn {
    background-color: #4363d8;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.download-btn:hover {
    background-color: #3651b3;
}

.download-btn:active {
    background-color: #2a3f8f;
}

@media (max-width: 767px) {
    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .download-btn {
        width: 100%;
    }
}