/* ========================================
  RESET & DEFAULTS
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
  VARIABLES
======================================== */
:root {
    --font-family: 'Be Vietnam Pro', serif;
    --clr-primary: hsl(331, 86%, 48%);
    --clr-primary-saturated: hsl(331, 93%, 48%);
    --clr-primary-dark: hsl(331, 86%, 40%);
    --clr-primary--20: hsla(331, 86%, 48%, 0.2);
    --clr-primary--30: hsla(331, 86%, 48%, 0.3);
    --clr-primary--80: hsla(331, 86%, 48%, 0.8);
    --clr-accent: hsl(25, 88%, 53%);
    --clr-accent-light: hsl(25, 100%, 60%);
    --clr-white: hsl(0, 0%, 100%);
    --clr-text: hsl(246, 35%, 28%);
    --clr-primary-gradient: linear-gradient(to right, var(--clr-primary-saturated), var(--clr-accent));
    --clr-primary-gradient--reverse: linear-gradient(to left, var(--clr-primary-saturated), var(--clr-accent));
    --clr-primary-gradient--145deg: linear-gradient(145deg, var(--clr-primary-saturated), var(--clr-accent));
}

/* ========================================
  GENERAL STYLES
======================================== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Be Vietnam Pro", serif;
}

p {
    font-size: 20px;
}

.container {
    flex: 1;
}

/* ========================================
  HEADER & TOP SECTION
======================================== */
.top-section {
    background: var(--clr-primary-gradient);
    color: #fff;
    padding-bottom: 20px;
}

.logo {
    max-width: 280px;
    height: auto;
}

.mb-3 {
    font-weight: bold;
    font-size: 1.3rem;
}

.space-left {
  margin-left: 5px; /* Điều chỉnh khoảng cách tùy ý */
}

/* ========================================
  FORM & INPUT GROUP
======================================== */
#urlForm {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.custom-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    padding: 5px;
    background: #ffffff;
    gap: 10px;
    width: 900px;
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
}

.nhomnhapvadan {
    border-radius: 5px !important;
    background-color: #ffffff;
    color: #000;
    border: 0px solid #ced4da;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, border-color 0.3s;
    flex-shrink: 0;
    gap: 5px;
    width: 81%;
}

.nhap {
    border-radius: 5px !important;
    border: 0px solid #ced4da;
    padding: 10px;
    flex: 1;
    min-width: 0;
    outline: none;
}

.dan {
    border-radius: 5px !important;
    background-color: #ebf1ff;
    color: #0423ee;
    padding: 6px 11px;
    border: 1px solid #ebf1ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.taivideo {
    border-radius: 5px !important;
    background-color: #007bff;
    color: #fff;
    padding: 10px;
    border: 1px solid #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, border-color 0.3s;
    flex-shrink: 0;
}

.shadow-hover:hover {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.dan:hover {
    background-color: #dae4ff;
    border-color: #dae4ff;
    color: #0423ee;
}

.taivideo:hover {
    background-color: #0056b3;
    border-color: #004085;
    color: #fff;
}

/* ========================================
  VIDEO CONTAINER & RESULT
======================================== */
#videoContainer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 20px;
}

#videoPlayerWrapper video {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.video-info {
    margin-bottom: 10px;
    width: 100%;
    word-break: break-all;
}

.video-info h2 {
    font-size: 1.3rem;
    text-align: left;
}

.video-player-wrapper {
    width: 100%;
    margin-top: 10px;
}

.video-player {
    width: 100%;
    border-radius: 5px;
}

.video-cover {
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 360px;
}

.info-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 400px;
    margin-left: 20px;
    padding-top: 11px;
}

.btn-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
}

.btn i {
    font-size: 24px;
    vertical-align: middle;
}
.btn-group .btn {
    display: flex;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 5px !important;
    box-sizing: border-box;
    border: 1px solid transparent;
    justify-content: center;
}
/* ========================================
    BOTTOM SECTION & FEATURES
  ======================================== */
  .bottom-section {
    background-color: #ffffff;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bottom-section .container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.features-main-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.feature-item {
    text-align: center;
    width: 30%;
    padding: 20px;
    margin-bottom: 20px;
}

.feature-icon {
    width: 100px;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.feature-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

/* ========================================
  GUIDE SECTION
======================================== */
.header-description-section {
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: center;
}

.header-description-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #2c3e50;
}

.header-description-content {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.guide-section {
    background-color: #f8f9fa;
    padding: 40px;
    border-radius: 15px;
    color: #2c3e50;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.10)
}

.guide-title {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.guide-step {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 25px;
}

.guide-step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.guide-step-number {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    background-color: #ff9800;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    flex-shrink: 0;
}

.guide-step-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
}

.guide-step-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* ========================================
  FOOTER
======================================== */
.custom-footer {
    color: #2c3e50;
    padding-top: 30px;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.footer-links li {
    display: inline-block;
}

.footer-links a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease-in-out;
    padding: 10px;
}

.footer-links a:hover {
    text-decoration: none;
    color: #ff9800;
}

.disclaimer {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
    color: #666;
}

.copyright {
    font-size: 14px;
    color: #666;
}

/* ========================================
  LOADING OVERLAY
======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
}

.loading-text {
    margin-top: 10px;
    font-size: 18px;
    color: #333;
}

/* ========================================
  RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .guide-section {
        padding: 15px;
        border-radius: 5px;
    }
    .guide-step {
        padding: 20px;
    }
    .custom-input-group {
        flex-direction: row;
        align-items: center;
        background: #ffffff00;
        box-shadow: 0 0 0px rgba(0, 0, 0, 0.0);
        width: 100%;
        margin-bottom: 0;
    }
    .nhomnhapvadan {
        flex-direction: row;
        align-items: center;
        background-color: #ffffff;
        padding: 10px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        width: 100%;
        margin-bottom: 0;
    }
    .nhap {
        flex: 1;
        margin-bottom: 0;
        border-radius: 5px !important;
    }
    .dan {
        margin-left: 10px;
        margin-bottom: 0;
        border-radius: 5px !important;
        display: flex;
        justify-content: center;
    }
    .taivideo {
        width: 100%;
        margin-top: 10px;
    }
    .dan span {
        display: none;
    }
    .info-buttons {
        width: 100%;
        padding-top: 8px;
    }
    .btn-group .btn {
        width: 100%;
        font-size: 14px;
        margin-bottom: 10px;
    }
    .content-wrapper {
        width: 100%;
    }
    .video-info h2 {
        font-size: 0.8rem;
        text-align: left;
    }
    .video-player-wrapper {
        width: 100%;
    }
    .footer p {
        font-size: 0.8rem;
    }
    .bottom-section p {
        font-size: 12px;
     }
    .feature-item {
        width: 90%;
    }
    .mb-3 {
        font-size: 17px;
    }
    
    .footer-links {
        display: grid; /* Sử dụng CSS Grid */
        grid-template-columns: repeat(3, 1fr); /* Chia thành 3 cột bằng nhau */
        justify-content: center;
    }
    .footer-links li {
        text-align: center;
    }
    
    .footer-links a {
        font-size: 0.6rem;
    }
}