:root {
    --color-white: rgba(255, 255, 255, 1);
    --color-black: rgba(0, 0, 0, 1);
    --color-cream-50: rgba(252, 252, 249, 1);
    --color-gray-200: rgba(245, 245, 245, 1);
    --color-gray-300: rgba(167, 169, 169, 1);
    --color-slate-500: rgba(98, 108, 113, 1);
    --color-slate-900: rgba(19, 52, 59, 1);
    --color-teal-300: rgba(50, 184, 198, 1);
    --color-teal-500: rgba(33, 128, 141, 1);
    --color-teal-600: rgba(29, 116, 128, 1);
    --color-red-400: rgba(255, 84, 89, 1);
    --color-orange-500: rgba(168, 75, 47, 1);
    --color-green-500: rgba(34, 197, 94, 1);

    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 28px;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --space-2: 2px;
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --radius-sm: 6px;
    --radius-base: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.12);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding: 24px;
    max-width: 1400px;
    margin: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.disclaimer {
    background: linear-gradient(135deg, #ffc107, #ffed4e);
    padding: 20px;
    margin: 0 0 30px 0;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
    border-left: 5px solid #e0a800;
}

.title {
    text-align: center;
    font-size: 28px;
    color: #1a3c5e;
    margin-bottom: 20px;
}

.api-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

.api-panel {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    transition: all var(--duration-normal) var(--ease-standard);
    cursor: pointer;
}

.api-panel:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    border-color: #1a3c5e;
}

.api-panel h3 {
    color: #1a3c5e;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.api-panel p {
    color: #666;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .api-grid {
        grid-template-columns: 1fr;
    }

    body {
        padding: 16px;
    }
}

/* HEADER STYLES */
.header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
    padding: var(--space-12) var(--space-16);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    min-height: 56px;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    flex: 1;
}

.header-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-teal-500);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.header-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-gray-300);
    font-weight: var(--font-weight-regular);
}

.header-actions {
    display: flex;
    gap: var(--space-8);
    align-items: center;
}

.icon-button {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--color-gray-200);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-standard);
    padding: 0;
    flex-shrink: 0;
}

.icon-button:active {
    background: var(--color-teal-300);
    color: var(--color-white);
    transform: scale(0.95);
}

.icon-button:hover {
    background: var(--color-gray-300);
}

.disclaimer-banner {
    background-color: var(--color-gray-200);
    padding: var(--space-8) var(--space-16);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-slate-900);
    text-align: center;
    border-bottom: 1px solid var(--color-gray-200);
    line-height: 1.4;
}

/* SEARCH & FILTER SECTION */
.search-filter-section {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
    padding: var(--space-12) var(--space-16);
    position: sticky;
    top: 56px;
    z-index: 99;
}

.search-bar {
    position: relative;
    margin-bottom: var(--space-12);
}

.search-input {
    width: 100%;
    padding: var(--space-12) var(--space-16);
    padding-left: var(--space-32);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    background: var(--color-gray-200);
    font-family: var(--font-family-base);
    transition: all var(--duration-fast);
    -webkit-appearance: none;
    appearance: none;
    color: var(--color-slate-900);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-teal-500);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(33, 128, 141, 0.1);
}

.search-input::placeholder {
    color: var(--color-gray-300);
}

.search-icon {
    position: absolute;
    left: var(--space-12);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--font-size-md);
    color: var(--color-gray-300);
    pointer-events: none;
}

.filter-tabs {
    display: flex;
    gap: var(--space-8);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 0;
}

.filter-tabs::-webkit-scrollbar {
    height: 3px;
}

.filter-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.filter-tabs::-webkit-scrollbar-thumb {
    background: var(--color-teal-500);
    border-radius: var(--radius-full);
}

.filter-btn {
    padding: var(--space-8) var(--space-16);
    border: 1.5px solid var(--color-teal-500);
    background: var(--color-white);
    color: var(--color-teal-500);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    transition: all var(--duration-normal) var(--ease-standard);
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
}

.filter-btn:active {
    transform: scale(0.95);
}

.filter-btn.active {
    background: var(--color-teal-500);
    color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(33, 128, 141, 0.15);
}

/* MAIN CONTENT */
.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-12) var(--space-12);
    margin-bottom: 80px;
    background: var(--color-cream-50);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.content::-webkit-scrollbar {
    width: 6px;
}

.content::-webkit-scrollbar-track {
    background: transparent;
}

.content::-webkit-scrollbar-thumb {
    background: var(--color-teal-500);
    border-radius: var(--radius-full);
    opacity: 0.3;
}

.content::-webkit-scrollbar-thumb:hover {
    opacity: 0.6;
}

/* EMPTY STATE */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-32) var(--space-16);
    text-align: center;
    color: var(--color-gray-300);
    min-height: 300px;
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: var(--space-16);
    opacity: 0.6;
    line-height: 1;
}

.empty-state-title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--color-slate-500);
    margin-bottom: var(--space-8);
}

.empty-state-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-gray-300);
    line-height: 1.4;
}

/* API CARD */
.api-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--space-16);
    margin-bottom: var(--space-12);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-normal) var(--ease-standard);
    border: 1px solid var(--color-gray-200);
    cursor: pointer;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.api-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-xs);
}

.api-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-teal-300);
}

.api-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-12);
    gap: var(--space-12);
}

.api-card-header-content {
    flex: 1;
    min-width: 0;
}

.api-card-title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--color-slate-900);
    line-height: 1.3;
    word-break: break-word;
    margin-bottom: var(--space-4);
}

.api-card-endpoint {
    font-size: var(--font-size-xs);
    color: var(--color-teal-500);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.7;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: var(--space-4);
    transition: all var(--duration-normal);
    color: var(--color-gray-300);
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn.active {
    color: var(--color-red-400);
    animation: heartBeat 0.3s ease-out;
}

.favorite-btn:active {
    transform: scale(0.9);
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.api-card-category {
    display: inline-block;
    padding: var(--space-6) var(--space-12);
    background: rgba(33, 128, 141, 0.12);
    color: var(--color-teal-600);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-12);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.api-card-description {
    font-size: var(--font-size-sm);
    color: var(--color-slate-500);
    line-height: 1.5;
    margin-bottom: var(--space-12);
}

.api-card-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--space-12);
    padding-top: var(--space-12);
    border-top: 1px solid var(--color-gray-200);
    font-size: var(--font-size-xs);
    color: var(--color-gray-300);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    line-height: 1.4;
    overflow: hidden;
}

.meta-label {
    font-weight: var(--font-weight-medium);
    color: var(--color-slate-500);
    flex-shrink: 0;
}

.meta-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-badge {
    padding: var(--space-6) var(--space-10);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.auth-badge.open {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-green-500);
}

.auth-badge.key {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-orange-500);
}

/* BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-top: 1px solid var(--color-gray-200);
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.08);
    z-index: 200;
    height: 80px;
}

.nav-item {
    flex: 1;
    padding: var(--space-8) var(--space-12);
    border: none;
    background: none;
    color: var(--color-gray-300);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    transition: all var(--duration-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
}

.nav-item:active {
    background: rgba(33, 128, 141, 0.08);
}

.nav-item.active {
    color: var(--color-teal-500);
}

.nav-icon {
    font-size: var(--font-size-2xl);
    line-height: 1;
}

.nav-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    text-transform: capitalize;
}

.nav-item.active .nav-label {
    font-weight: var(--font-weight-semibold);
}

/* ALERT BADGE */
.alert-badge {
    width: 18px;
    height: 18px;
    background: var(--color-red-400);
    color: var(--color-white);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 4px;
    right: 8px;
    border: 2px solid var(--color-white);
    animation: badgePulse 1.5s ease-in-out infinite;
}

.alert-badge.hidden {
    display: none;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* TOAST NOTIFICATION */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-slate-900);
    color: var(--color-white);
    padding: var(--space-12) var(--space-16);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    z-index: 1000;
    max-width: 280px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    word-break: break-word;
    line-height: 1.4;
    animation: toastSlideUp 0.3s ease-out;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* DETAIL MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: flex-end;
    z-index: 1000;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--color-white);
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-24);
    padding-bottom: var(--space-32);
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--space-16);
    right: var(--space-16);
    background: var(--color-gray-200);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast);
}

.modal-close:active {
    background: var(--color-teal-300);
    color: var(--color-white);
}

.modal-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-slate-900);
    margin-bottom: var(--space-16);
    word-break: break-word;
}

.modal-detail {
    margin-bottom: var(--space-16);
    padding-bottom: var(--space-16);
    border-bottom: 1px solid var(--color-gray-200);
}

.modal-detail:last-child {
    border-bottom: none;
}

.modal-detail-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-teal-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: var(--space-8);
}

.modal-detail-value {
    font-size: var(--font-size-base);
    color: var(--color-slate-900);
    word-break: break-all;
    font-family: 'Courier New', monospace;
    background: var(--color-gray-200);
    padding: var(--space-12);
    border-radius: var(--radius-lg);
    line-height: 1.5;
}

/* RESPONSIVE */
@media (min-width: 600px) {
    .container {
        max-width: 600px;
        margin: 0 auto;
        height: 100vh;
        border-left: 1px solid var(--color-gray-200);
        border-right: 1px solid var(--color-gray-200);
    }
}

@media (max-width: 400px) {
    .header-title {
        font-size: var(--font-size-xl);
    }

    .api-card-meta {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .filter-btn {
        padding: var(--space-6) var(--space-12);
        font-size: var(--font-size-xs);
    }
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-cream-50: rgba(30, 35, 35, 1);
        --color-white: rgba(45, 50, 50, 1);
        --color-gray-200: rgba(60, 65, 65, 1);
        --color-gray-300: rgba(120, 125, 125, 1);
        --color-slate-500: rgba(160, 165, 165, 1);
        --color-slate-900: rgba(240, 245, 245, 1);
    }
}
/* TIMELINE UI STYLES - Matched to User Request */

.timeline-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Timeline Disclaimer (Sticky) */
.disclaimer.timeline-mode {
    background: #fbbf24; /* yellow-400 */
    color: black;
    padding: 16px;
    border-radius: 12px; /* rounded-xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); /* shadow-lg */
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
    position: sticky;
    top: 20px;
    z-index: 50;
    border: none; /* Override previous left border */
}

/* Timeline Card */
.timeline-card {
    background: white;
    border-radius: 16px; /* rounded-2xl */
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* shadow-md */
    transition: all 0.2s ease;
    border-left: 4px solid #3b82f6; /* Default blue-500 */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); /* shadow-xl */
}

.timeline-card.border-green { border-left-color: #22c55e; } /* green-500 */
.timeline-card.border-blue { border-left-color: #3b82f6; } /* blue-500 */
.timeline-card.border-purple { border-left-color: #a855f7; } /* purple-500 */
.timeline-card.border-orange { border-left-color: #f97316; } /* orange-500 */

/* Card Header Layout */
.t-header {
    display: flex;
    align-items: flex-start;
    gap: 12px; /* space-x-3 */
}

/* Avatar Circle */
.t-avatar {
    width: 48px; /* w-12 */
    height: 48px; /* h-12 */
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}
.t-avatar.bg-blue { background-color: #3b82f6; }
.t-avatar.bg-green { background-color: #22c55e; }
.t-avatar.bg-purple { background-color: #a855f7; }
.t-avatar.bg-orange { background-color: #f97316; }

/* Content Area */
.t-content {
    flex: 1;
}

.t-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.t-title {
    font-size: 18px; /* text-lg */
    font-weight: 700;
    color: #1f2937; /* gray-800 */
}

.t-time {
    font-size: 12px; /* text-xs */
    color: #6b7280; /* gray-500 */
}

.t-desc {
    color: #4b5563; /* gray-600 */
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Latest Update Box */
.t-update-box {
    background-color: #f3f4f6; /* gray-100 */
    padding: 12px;
    border-radius: 8px; /* rounded-lg */
    font-size: 14px; /* text-sm */
    color: #374151;
}

/* Action Button */
.t-like-btn {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.1s;
}
.t-like-btn:hover { transform: scale(1.1); }

/* Bottom Navigation (Fixed) */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 9999px;
    padding: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
    display: flex;
    gap: 8px;
    z-index: 100;
}

.nav-pill {
    padding: 12px;
    border-radius: 9999px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-pill.active {
    background: #3b82f6; /* blue-500 */
    color: white;
}
