:root {
    --legacy-border: #d7d7d7;
    --legacy-text: #111111;
    --legacy-muted: #666666;
    --legacy-soft: #f8f8f8;
    --legacy-soft-2: #fafafa;
}

body.index-page {
    background: #ffffff;
    color: var(--legacy-text);
}

body.index-page > .container {
    width: min(1260px, calc(100% - 24px));
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

body.index-page > .container > main {
    display: block;
}

body.index-page .main-container-wrapper {
    width: 100%;
}

body.index-page .flight-section {
    width: 100%;
    padding: 24px 0 40px;
}

body.index-page .legacy-top-ad-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 18px;
    overflow-x: auto;
}

body.index-page .flight-section h1 {
    margin: 14px 0 8px;
    color: #111111;
    font-size: 2.3rem;
    line-height: 1.34;
    letter-spacing: -0.02em;
}

body.index-page .flight-section h2 {
    margin: 0 0 10px;
    border: 0;
    padding: 0;
    color: #111111;
    font-size: 1.6rem;
    line-height: 1.4;
}

body.index-page .flight-section .subtitle {
    margin: 0 0 22px;
    color: #444444;
    font-size: 1.05rem;
    line-height: 1.7;
}

body.index-page .passenger-info-card {
    margin-bottom: 20px;
    border: 1px solid var(--legacy-border);
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    cursor: pointer;
}

body.index-page .passenger-info-card:hover {
    border-color: #bdbdbd;
}

body.index-page .passenger-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #e7e7e7;
}

body.index-page .passenger-card-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111111;
    line-height: 1.4;
}

body.index-page .passenger-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #111111;
}

body.index-page .passenger-card-content {
    padding: 12px 16px 14px;
}

body.index-page .passenger-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666666;
    min-height: 68px;
    font-size: 0.96rem;
}

body.index-page .flight-search-filter {
    margin: 0 0 14px;
}

body.index-page .search-bar-container {
    margin-bottom: 12px;
}

body.index-page .search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

body.index-page .search-icon {
    position: absolute;
    left: 14px;
    color: #666666;
    font-size: 1.05rem;
}

body.index-page .flight-search-input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 42px;
    border: 1px solid var(--legacy-border);
    border-radius: 10px;
    background: #ffffff;
    color: #111111;
    font-size: 1rem;
    outline: 0;
}

body.index-page .flight-search-input:focus {
    border-color: #111111;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

body.index-page .search-clear-btn {
    position: absolute;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #666666;
    cursor: pointer;
}

body.index-page .search-clear-btn:hover {
    background: #f1f1f1;
    color: #111111;
}

body.index-page .filter-badges-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

body.index-page .filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    border-radius: 999px;
    padding: 0 10px;
    background: #111111;
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 600;
}

body.index-page .filter-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

body.index-page .filter-remove-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

body.index-page .search-notice-text {
    margin: 0 0 18px;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    background: var(--legacy-soft);
    padding: 12px 14px;
}

body.index-page .search-notice-text .notice-text {
    margin: 0;
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.6;
}

body.index-page .search-notice-text .notice-text strong {
    color: #111111;
}

body.index-page .loading-state,
body.index-page .error-state,
body.index-page .empty-state,
body.index-page .no-results {
    border: 1px solid var(--legacy-border);
    border-radius: 10px;
    background: #ffffff;
    padding: 22px 16px;
    text-align: center;
    color: #666666;
}

body.index-page .empty-icon,
body.index-page .no-results-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: #8d8d8d;
}

body.index-page .loading-spinner,
body.index-page .loading-spinner-small {
    border-style: solid;
    border-color: #d7d7d7;
    border-top-color: #111111;
    border-radius: 50%;
    animation: legacySpin 0.8s linear infinite;
}

body.index-page .loading-spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
    margin: 0 auto 10px;
}

body.index-page .loading-spinner-small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

@keyframes legacySpin {
    to {
        transform: rotate(360deg);
    }
}

body.index-page .flight-cards-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

body.index-page .flight-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--legacy-border);
    border-radius: 10px;
    background: #ffffff;
    padding: 12px;
}

body.index-page .flight-card:hover {
    border-color: #bdbdbd;
}

body.index-page .flight-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e7e7e7;
}

body.index-page .flight-airline {
    font-size: 1rem;
    font-weight: 700;
    color: #111111;
    line-height: 1.25;
}

body.index-page .flight-number {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    background: #f7f7f7;
    color: #666666;
    font-size: 0.78rem;
    font-weight: 600;
}

body.index-page .flight-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

body.index-page .flight-status.arrived {
    background: #edf8ef;
    border: 1px solid #cfe8d5;
    color: #1f7a36;
}

body.index-page .flight-status.delayed {
    background: #fff4e8;
    border: 1px solid #f1d5b6;
    color: #b4641a;
}

body.index-page .flight-status.departed {
    background: #edf4ff;
    border: 1px solid #c8daf8;
    color: #24559a;
}

body.index-page .flight-status.unknown,
body.index-page .flight-status.cancelled {
    background: #f4f4f4;
    border: 1px solid #dfdfdf;
    color: #666666;
}

body.index-page .flight-route {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

body.index-page .route-item {
    text-align: center;
}

body.index-page .route-label {
    margin-bottom: 4px;
    font-size: 0.64rem;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

body.index-page .route-city {
    font-size: 0.95rem;
    color: #111111;
    font-weight: 700;
    line-height: 1.3;
}

body.index-page .route-code {
    margin-top: 2px;
    font-size: 0.74rem;
    color: #111111;
    font-weight: 600;
}

body.index-page .route-arrow {
    color: #111111;
    font-size: 1rem;
}

body.index-page .flight-time {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
    padding-top: 10px;
    border-top: 1px solid #e7e7e7;
}

body.index-page .time-item {
    text-align: center;
}

body.index-page .time-label {
    font-size: 0.72rem;
    color: #666666;
    margin-bottom: 4px;
}

body.index-page .time-value {
    font-size: 0.98rem;
    color: #111111;
    font-weight: 700;
}

body.index-page .time-diff {
    margin-top: 3px;
    font-size: 0.72rem;
    color: #111111;
    font-weight: 600;
}

body.index-page .flight-info {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #e7e7e7;
}

body.index-page .info-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.77rem;
    color: #666666;
    line-height: 1.45;
}

body.index-page .info-item + .info-item {
    margin-top: 5px;
}

body.index-page .info-value {
    color: #111111;
    font-weight: 600;
    text-align: right;
}

body.index-page .flight-pagination-top,
body.index-page .flight-pagination {
    margin: 16px 0 12px;
    border: 1px solid var(--legacy-border);
    border-radius: 10px;
    background: #ffffff;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 12px;
}

body.index-page .pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 86px;
    height: 34px;
    border: 1px solid var(--legacy-border);
    border-radius: 8px;
    background: #ffffff;
    color: #111111;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

body.index-page .pagination-btn:disabled {
    opacity: 0.48;
    cursor: default;
}

body.index-page .pagination-btn:hover:not(:disabled) {
    border-color: #111111;
    background: #111111;
    color: #ffffff;
}

body.index-page .pagination-info {
    color: #666666;
    font-size: 0.9rem;
    font-weight: 600;
}

body.index-page .passenger-table-container {
    width: 100%;
    overflow-x: auto;
}

body.index-page .passenger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

body.index-page .passenger-table th,
body.index-page .passenger-table td {
    border-bottom: 1px solid #ececec;
    padding: 8px 8px;
    text-align: center;
    white-space: nowrap;
}

body.index-page .passenger-table th {
    background: var(--legacy-soft-2);
    color: #222222;
    font-weight: 700;
}

body.index-page .passenger-table td {
    color: #111111;
}

body.index-page .passenger-table .time-column {
    font-weight: 700;
    color: #111111;
}

body.index-page .passenger-table tr:hover {
    background: var(--legacy-soft);
}

body.index-page .faq-section {
    margin-top: 28px;
}

body.index-page .faq-section h2 {
    margin: 0 0 14px;
    border-bottom: 1px solid var(--legacy-border);
    padding-bottom: 8px;
    color: #111111;
    font-size: 1.5rem;
}

body.index-page .faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

body.index-page .faq-card {
    border: 1px solid var(--legacy-border) !important;
    border-radius: 10px;
    background: #ffffff !important;
    padding: 16px;
}

body.index-page .faq-card h3 {
    margin: 0 0 8px;
    color: #111111;
    font-size: 1.02rem;
    line-height: 1.45;
}

body.index-page .faq-card p {
    margin: 0;
    color: #444444;
    font-size: 0.93rem;
    line-height: 1.65;
}

@media (max-width: 1200px) {
    body.index-page .flight-cards-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    body.index-page .flight-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.index-page .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body.index-page > .container {
        width: calc(100% - 20px);
    }

    body.index-page .flight-section {
        padding: 14px 0 26px;
    }

    body.index-page .flight-section h1 {
        font-size: 1.76rem;
    }

    body.index-page .flight-section h2 {
        font-size: 1.2rem;
    }

    body.index-page .passenger-card-header,
    body.index-page .passenger-card-content,
    body.index-page .search-notice-text,
    body.index-page .loading-state,
    body.index-page .error-state,
    body.index-page .empty-state,
    body.index-page .no-results {
        border-radius: 8px;
    }

    body.index-page .flight-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    body.index-page .flight-pagination-top,
    body.index-page .flight-pagination {
        border-radius: 8px;
        gap: 8px;
    }

    body.index-page .pagination-btn {
        min-width: 72px;
        height: 32px;
        font-size: 0.82rem;
    }

    body.index-page .passenger-table {
        font-size: 0.82rem;
    }
}
