:root {
    --primary: #fe2c55;
    --secondary: #25f4ee;
    --bg: #1e1e24;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: #a0a0b0;
    --toast-bg: var(--secondary);
    --toast-text: #000;
}

body.light-mode {
    --bg: #f2f2f7;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-border: rgba(0, 0, 0, 0.08);
    --text: #1c1c1e;
    --text-muted: #6c6c70;
    --toast-bg: #1c1c1e;
    --toast-text: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(circle at top right, rgba(254, 44, 85, 0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(37, 244, 238, 0.15), transparent 40%);
    background-attachment: fixed;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--surface-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
}

.header-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    font-size: 1rem;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--primary);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--surface-border);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
}

body.light-mode .icon-sun {
    display: none;
}

body:not(.light-mode) .icon-moon {
    display: none;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 2rem 0.5rem;
}

.container {
    max-width: 800px;
    width: 100%;
    margin-top: 1vh;
    text-align: center;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.search-box {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 99px;
    padding: 0.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: stretch;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-box:focus-within {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 1.1rem;
    padding: 0 1.5rem;
    width: 100%;
    min-height: 58px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box button {
    background: var(--primary);
    color: white;
    border: none;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 1.75rem;
    border-radius: 99px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 58px;
    width: 100%;
}

.search-box button:hover {
    background: #ff1c45;
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--surface-border);
    border-bottom-color: var(--secondary);
    border-radius: 50%;
    display: none;
    animation: rotation 1s linear infinite;
    margin: 3rem auto;
}

.spinner {
    width: 18px;
    height: 18px;
    display: inline-block;
    animation: rotation 1s linear infinite;
    border: none;
    border-radius: 0;
    margin: 0;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.result-card {
    margin-top: 1rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: 360px 1fr;
    align-items: flex-start;
    gap: 1.25rem;
    text-align: left;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-card.layout-stacked {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    align-items: stretch;
}

.result-card.layout-stacked .media-preview {
    width: 100%;
}

.result-card.layout-stacked .video-container {
    width: 100% !important;
    height: auto !important;
    margin-bottom: 0.5rem;
}

/* Video 9:16 khi stacked: căn giữa, giới hạn chiều cao */
.result-card.layout-stacked .video-container.ratio-9-16 {
    max-height: 70vh;
    width: auto !important;
    aspect-ratio: 9 / 16;
    margin-left: auto;
    margin-right: auto;
}

/* Video 16:9 khi stacked: full width */
.result-card.layout-stacked .video-container.ratio-16-9 {
    width: 100% !important;
    aspect-ratio: 16 / 9;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-container {
    width: 360px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container.ratio-9-16 {
    aspect-ratio: 9 / 16;
}

.video-container.ratio-16-9 {
    aspect-ratio: 16 / 9;
}

.video-container.gallery-mode-container {
    aspect-ratio: 9/16;
}

.video-container video,
.video-container .cover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.images-grid.gallery-mode {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    scrollbar-width: none;
    cursor: grab;
    z-index: 10;
    touch-action: pan-x pan-y;
}

.images-grid.gallery-mode::-webkit-scrollbar {
    display: none;
}

.images-grid.gallery-mode .img-wrapper {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
}

.images-grid.gallery-mode img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.slide-dots {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    pointer-events: none;
}

.slide-dots-inner {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    width: fit-content;
    max-width: 90px;
    /* Chỉ hiện tối đa 5 chỉ báo (2 lân cận mỗi bên) cho cân đối */
    height: 18px;
    overflow: hidden;
    position: relative;
    padding: 0 8px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.dots-scroller {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    flex-shrink: 0;
    transform: scale(0.6);
}

.dot.active {
    background: #FFF;
    width: 15px;
    /* Kiểu viên thuốc */
    border-radius: 4px;
    transform: scale(1);
}

.dot.medium {
    transform: scale(0.9);
    /* To rõ (kết hợp cho 2 ở giữa hoặc 3 ở đầu) */
}

.dot.small {
    transform: scale(0.65);
    /* Nhỏ vừa (cấp độ 1) */
}

.dot.smaller {
    transform: scale(0.4);
    /* Rất nhỏ (cấp độ 2) */
}

.dot.smallest {
    transform: scale(0.25);
    /* Siêu nhỏ (cấp độ 3) */
}

.dot.hide {
    transform: scale(0);
    opacity: 0;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.dot.active {
    background: #FFF;
    width: 15px;
    border-radius: 4px;
}

.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 40;
    transition: 0.3s;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

.slide-nav:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.slide-nav.prev {
    left: 15px;
}

.slide-nav.next {
    right: 15px;
}

.play-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    cursor: pointer;
    opacity: 0.9;
    z-index: 25;
}

.dl-icon {
    position: absolute;
    bottom: 20px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    z-index: 35;
    backdrop-filter: blur(4px);
}

.dl-icon:hover {
    background: var(--primary);
}

.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--toast-bg);
    color: var(--toast-text);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.error {
    background: var(--primary);
    color: white;
}

@media (max-width: 768px) {
    .toast {
        top: 20px;
        left: 50%;
        right: auto;
        transform: translate(-50%, -100px);
        width: max-content;
        max-width: calc(100% - 32px);
        text-align: center;
        box-shadow: 0 5px 20px rgba(254, 44, 85, 0.3);
    }

    .toast.show {
        transform: translate(-50%, 0);
    }
}

.media-preview {
    display: block;
    height: fit-content;
}

.result-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface-border);
}

.author-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.author-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.author-link:hover .author-name {
    color: var(--primary);
}

.video-desc {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    line-height: 1.4;
    overflow: hidden;
    font-size: 0.95rem;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    min-height: 56px;
    border-radius: 12px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: transparent;
}

body.light-mode .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
    border-color: var(--surface-border);
}

body.light-mode .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.codec-note {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid transparent;
    border-left: 3px solid var(--primary);
    background: var(--surface-border);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: left;
    opacity: 0.9;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.light-mode .codec-note {
    border-color: var(--surface-border);
    border-left-color: var(--primary);
}

@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .header-nav {
        gap: 0.8rem;
    }

    .header-nav a {
        font-size: 0.9rem;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .main-content {
        padding: 0.8rem 0.8rem;
    }

    .result-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.8rem;
        gap: 1rem;
        width: 100%;
        border-radius: 12px;
    }

    .media-preview {
        width: 100%;
    }

    .result-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 1rem;
    }

    .author {
        margin-bottom: 0.5rem;
    }

    .video-desc {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .author img {
        width: 40px;
        height: 40px;
    }

    .video-container {
        width: 100%;
        height: auto;
    }

    .search-box {
        grid-template-columns: 1fr;
        border-radius: 20px;
        gap: 0.8rem;
        padding: 0.8rem;
    }

    .search-box input,
    .search-box button {
        width: 100%;
        padding: 1rem;
        border-radius: 12px;
        font-size: 1rem;
    }
}

footer {
    background: var(--surface);
    border-top: 1px solid var(--surface-border);
    padding: 2rem 2rem 2rem;
    margin-top: 0.6rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    font-weight: 800;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--surface-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 800;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-5px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--surface-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        margin-top: 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .social-links {
        justify-content: center;
    }
}

/* Platform Specific Badge */
.platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.platform-badge.tiktok {
    background: #000;
    color: #fff;
    border: 1px solid #fe2c55;
}

.platform-badge.facebook {
    background: #1877f2;
    color: #fff;
}

.platform-badge.youtube {
    background: #ff0000;
    color: #fff;
}

.author-icon {
    width: 36px;
    height: 36px;
    background: var(--surface-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Legal Pages Styling (Privacy, Terms, Copyright) */
.legal-container {
    max-width: 900px;
    width: 100%;
    margin: 1rem auto 4rem;
    padding: 0 1rem;
    text-align: left;
}

.legal-card {
    padding: 2rem 0;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-header {
    text-align: left;
    margin-bottom: 2.5rem;
}

.legal-icon-wrapper,
.legal-section-icon {
    display: none !important;
}

.legal-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.8rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 100%;
    margin: 0;
}

.legal-content {
    display: grid;
    gap: 2.5rem;
}

.legal-section {
    position: relative;
    padding-left: 1rem;
    transition: transform 0.3s ease;
}

.legal-section:hover {
    transform: translateX(5px);
}

.legal-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.legal-section-icon {
    width: 36px;
    height: 36px;
    background: var(--surface-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.legal-section-icon svg {
    width: 20px;
    height: 20px;
}

.legal-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.legal-section p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-left: 0;
}

.legal-footer-note {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--surface-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .legal-card {
        padding: 1.5rem 0;
    }

    .legal-section p {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .legal-icon-wrapper {
        width: 64px;
        height: 64px;
    }

    .legal-icon-wrapper svg {
        width: 32px;
        height: 32px;
    }
}

/* Result layout refresh */
.container {
    max-width: 1040px;
}

.result-card {
    width: 100%;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.media-column {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.media-preview-main {
    width: 100%;
}

.result-card.layout-landscape {
    grid-template-columns: 1fr;
    gap: 1.4rem;
}

.result-card.layout-landscape .media-column {
    display: block;
}

.result-card.layout-landscape .video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.result-card.layout-landscape .result-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 1rem 1.4rem;
    align-items: start;
}

.result-card.layout-landscape .result-topline,
.result-card.layout-landscape .result-info {
    grid-column: 1;
}

.result-card.layout-landscape .download-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.result-card.layout-portrait {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: start;
}

.result-card.layout-portrait .video-container {
    width: 100%;
}

.result-card.layout-portrait .video-container.ratio-9-16 {
    max-height: 72vh;
}

.result-card.layout-portrait .result-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-container iframe,
.video-container video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.result-title {
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.28;
    font-weight: 700;
    margin: 0;
    word-break: break-word;
}

.result-title-small {
    font-size: clamp(1rem, 1.7vw, 1.3rem);
    line-height: 1.32;
}

.result-info {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.download-panel {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--surface-border);
    background: rgba(255, 255, 255, 0.04);
}

body.light-mode .download-panel {
    background: rgba(255, 255, 255, 0.88);
}

.download-panel-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.download-note {
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--surface-border);
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

body.light-mode .download-note {
    background: rgba(0, 0, 0, 0.03);
}

.quality-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.quality-download {
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-copy-text {
    font-weight: 700;
}

.btn-note {
    font-size: 0.82rem;
    line-height: 1.3;
    color: var(--text-muted);
}

.btn-primary .btn-note {
    color: rgba(255, 255, 255, 0.86);
}

.author-link.no-link {
    pointer-events: none;
}

.codec-note {
    margin-top: 0;
    font-size: 0.84rem;
    line-height: 1.55;
}

@media (max-width: 920px) {
    .container {
        max-width: 100%;
    }

    .result-card.layout-landscape,
    .result-card.layout-portrait {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .result-card.layout-landscape .result-details {
        grid-template-columns: 1fr;
    }

    .result-card.layout-landscape .result-topline,
    .result-card.layout-landscape .result-info,
    .result-card.layout-landscape .download-panel {
        grid-column: auto;
        grid-row: auto;
    }

    .result-card.layout-portrait .media-column {
        max-width: min(100%, 380px);
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .result-card {
        text-align: left;
        align-items: stretch;
        padding: 1rem;
        border-radius: 16px;
    }

    .result-card.layout-landscape,
    .result-card.layout-portrait {
        display: grid;
        grid-template-columns: 1fr;
    }

    .result-info {
        align-items: flex-start;
        text-align: left;
    }

    .video-container {
        width: 100%;
    }
}

/* Info Sections (How-to & Features) */
.info-sections {
    margin-top: 4rem;
    animation: fadeIn 0.8s ease-out 0.3s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.how-to {
    margin-bottom: 4rem;
}

.how-to h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--text);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 2rem;
    border-radius: 24px;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 0, 80, 0.3);
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    padding: 1.5rem;
    border-radius: 20px;
    text-align: left;
}

body.light-mode .feature-item {
    background: rgba(255, 255, 255, 0.7);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Responsive Info Sections */
@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}