:root {
    --background: #f5f6f8;
    --surface: #ffffff;
    --text: #171a22;
    --muted: #717786;
    --border: #e2e5eb;
    --red: #ff0033;
    --red-dark: #d9002b;
    --green: #147a51;
    --green-background: #e9f7f0;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--background);
    font-size: 13px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.container {
    width: min(920px, calc(100% - 28px));
    margin: 0 auto;
}

.topbar {
    height: 52px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.topbar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 750;
}

.brand-icon {
    width: 30px;
    height: 22px;
    display: grid;
    place-items: center;
    padding-left: 2px;
    border-radius: 6px;
    color: white;
    background: var(--red);
    font-size: 10px;
}

.header-note {
    color: var(--muted);
    font-size: 11px;
}

.main-content {
    min-height: calc(100vh - 102px);
    padding-top: 18px;
    padding-bottom: 35px;
}

.search-section {
    margin-bottom: 15px;
}

.search-form {
    display: flex;
    gap: 7px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(20, 25, 40, 0.05);
}

.search-form input {
    flex: 1;
    min-width: 0;
    height: 39px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    outline: none;
    color: var(--text);
    background: #f7f8fa;
    font-size: 13px;
}

.search-form input:focus {
    border-color: #ffb5c4;
    background: white;
}

.search-form button {
    width: 88px;
    height: 39px;
    border: 0;
    border-radius: 7px;
    color: white;
    background: var(--red);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.search-form button:hover {
    background: var(--red-dark);
}

.alert {
    margin-top: 9px;
    padding: 10px 12px;
    border: 1px solid #ffd0d9;
    border-radius: 8px;
    color: #991b35;
    background: #fff1f4;
    font-size: 12px;
}

.result-section {
    margin-bottom: 15px;
}

.video-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(20, 25, 40, 0.05);
}

.thumbnail-wrapper {
    position: relative;
    height: 150px;
    overflow: hidden;
    background: #111111;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.duration {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 3px 6px;
    border-radius: 4px;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    font-size: 10px;
    font-weight: 700;
}

.video-content {
    min-width: 0;
    padding: 14px 16px;
}

.video-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.video-title-area {
    min-width: 0;
}

.video-label {
    display: block;
    margin-bottom: 4px;
    color: var(--red);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.video-content h1 {
    margin: 0 0 4px;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
}

.channel {
    color: var(--muted);
    font-size: 11px;
}

.status {
    flex-shrink: 0;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 750;
    white-space: nowrap;
}

.status.available {
    color: var(--green);
    background: var(--green-background);
}

.status.unavailable {
    color: #991b35;
    background: #fff0f3;
}

.video-stats {
    margin-top: 11px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.video-stats div {
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fafbfc;
}

.video-stats span {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 9px;
}

.video-stats strong {
    display: block;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.description {
    max-height: 38px;
    margin: 9px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.actions form {
    margin: 0;
}

.youtube-button,
.download-button {
    min-height: 30px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.youtube-button {
    border: 1px solid var(--border);
    color: var(--text);
    background: white;
}

.youtube-button:hover {
    background: #f5f6f8;
}

.download-button {
    border: 0;
    color: white;
    background: #1a1e28;
}

.download-button:hover {
    background: #303642;
}

.info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.info-row div {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.info-row strong {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
}

.info-row span {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

footer {
    height: 50px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer-content {
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--muted);
    font-size: 10px;
}

@media (max-width: 700px) {
    .header-note {
        display: none;
    }

    .video-card {
        grid-template-columns: 135px minmax(0, 1fr);
    }

    .thumbnail-wrapper {
        height: 105px;
    }

    .video-content {
        padding: 10px;
    }

    .video-content h1 {
        font-size: 14px;
    }

    .video-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .description {
        display: none;
    }

    .status {
        display: none;
    }

    .info-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-form {
        flex-direction: column;
    }

    .search-form button {
        width: 100%;
    }

    .video-card {
        grid-template-columns: 1fr;
    }

    .thumbnail-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .video-header {
        display: block;
    }
}

/* AI summary controls */

.summarize-button {
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid #cfd4de;
    border-radius: 6px;
    color: #171a22;
    background: #ffffff;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.summarize-button:hover {
    border-color: #171a22;
    background: #f3f4f6;
}

.summarize-button:disabled {
    color: #7c8290;
    border-color: #e0e3e8;
    background: #f1f2f4;
    cursor: wait;
}

.summary-card {
    margin-top: 10px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(20, 25, 40, 0.05);
}

.summary-heading {
    margin-bottom: 11px;
    padding-bottom: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--border);
}

.summary-label {
    display: block;
    margin-bottom: 3px;
    color: var(--red);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary-heading h2 {
    margin: 0;
    font-size: 15px;
}

.model-name {
    padding: 4px 7px;
    border-radius: 5px;
    color: var(--muted);
    background: #f2f3f6;
    font-size: 9px;
    white-space: nowrap;
}

.summary-text {
    max-width: 820px;
}

.summary-text p {
    margin: 0 0 9px;
    color: #3f4552;
    font-size: 11px;
    line-height: 1.6;
}

.summary-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .actions form {
        width: 100%;
    }

    .youtube-button,
    .download-button,
    .summarize-button {
        width: 100%;
    }

    .summary-card {
        padding: 13px;
    }
}

/* Browser language summary buttons */

.turkish-summary-form {
    display: none;
}






/* Submind SEO introduction */
.seo-intro {
    margin: 8px 0 18px;
    padding: 24px;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.seo-intro h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(23px, 4vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.seo-intro p {
    max-width: 680px;
    margin: 10px auto 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}


/* Summary pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    margin-top: 18px;
    gap: 7px;
    align-items: center;
    justify-content: center;
}

.pagination-button {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    color: #344054;
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease;
}

a.pagination-button:hover {
    color: #d9002b;
    background: #fff5f7;
    border-color: #ffb5c4;
}

.pagination-button.active {
    color: #ffffff;
    background: var(--red);
    border-color: var(--red);
}

.pagination-button.disabled {
    color: #a0a7b4;
    background: #f3f4f6;
    cursor: not-allowed;
}

.pagination-direction {
    min-width: 105px;
}

.pagination-ellipsis {
    padding: 0 3px;
    color: #7a8494;
    font-weight: 700;
}

@media (max-width: 610px) {
    .pagination {
        gap: 5px;
    }

    .pagination-button {
        min-width: 34px;
        height: 35px;
        padding: 0 9px;
        font-size: 12px;
    }

    .pagination-direction {
        min-width: auto;
    }
}
