/* Dashboard Specific Styles */

/* Video Background Container */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.navbar {
    position: relative;
    z-index: 3;
}

.footer {
    position: relative;
    z-index: 3;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: contain; /* Changed from cover to contain to show full video */
}

/* Video Controls */
.video-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2;
    display: flex;
    gap: 10px;
}

.video-control-btn {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
}

.video-control-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.video-control-btn.muted {
    background: rgba(255, 0, 0, 0.6);
}

.video-control-btn.muted:hover {
    background: rgba(255, 0, 0, 0.8);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.5) 100%);
    z-index: -1;
}

/* Main content area */
.main-content {
    position: relative;
    z-index: 1;
}

/* Dashboard Content */
.dashboard-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
}

/* Main Title */
.dashboard-title {
    font-size: 4rem;
    font-weight: bold;
    color: var(--white-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 2rem;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    }
    to {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 255, 255, 0.6);
    }
}

/* Subtitle */
.dashboard-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Action Buttons Container */
.dashboard-actions {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

/* Dashboard Buttons */
.dashboard-btn {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    min-width: 200px;
}

.dashboard-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.dashboard-btn:hover::before {
    left: 100%;
}

.dashboard-btn.contact {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: var(--white-color);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.dashboard-btn.contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.dashboard-btn.login {
    background: linear-gradient(135deg, var(--success-color), #1e7e34);
    color: var(--white-color);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.dashboard-btn.login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Floating Elements */
.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 20%;
    left: 15%;
    animation-delay: 4s;
}

.floating-element:nth-child(4) {
    bottom: 10%;
    right: 10%;
    animation-delay: 1s;
}

.logo-img {
    width: 440px;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Loading Animation */
.loading-animation {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white-color);
    animation: spin 1s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-title {
        font-size: 2.5rem;
    }

    .dashboard-subtitle {
        font-size: 1.2rem;
    }

    .dashboard-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-btn {
        min-width: 180px;
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-title {
        font-size: 2rem;
    }

    .dashboard-subtitle {
        font-size: 1rem;
    }

    .dashboard-container {
        padding: 1rem;
    }
}

/* Video Fallback */
@media (max-width: 768px) {
    .video-background video {
        width: 100vw !important;
        height: auto !important;
        left: 0;
        top: 0;
        min-width: unset !important;
        min-height: unset !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        transform: none !important;
        object-fit: contain !important;
        margin: 0 auto;
        display: block;
        position: relative;
    }
    .video-background {
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    }
    .video-controls {
        top: 10px;
        right: 10px;
    }
    .video-control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .logo-img {
        margin-top: 80px;
        width: 280px;
    }
}

/* Ensure video is visible on all screen sizes */
@media (min-width: 769px) {
    .video-background video {
        object-fit: contain;
        max-width: 100vw;
        max-height: 100vh;
    }
}

/* High aspect ratio screens */
@media (min-aspect-ratio: 16/9) {
    .video-background video {
        width: 100%;
        height: auto;
    }
}

/* Low aspect ratio screens */
@media (max-aspect-ratio: 16/9) {
    .video-background video {
        width: auto;
        height: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .dashboard-title,
    .floating-element,
    .dashboard-btn::before {
        animation: none;
    }

    .dashboard-btn:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .overlay {
        background: rgba(0, 0, 0, 0.9);
    }

    .dashboard-title {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
    }
}

/* Badge số lượng còn lại trên card vé kiến thiết */
.ticket-card .badge.position-absolute.top-0.end-0 {
    top: 50;
    right: 0;
    position: absolute;
    z-index: 2;
}
@media (max-width: 576px) {
    .ticket-card .badge.position-absolute.top-0.end-0 {
        top: -10px;
    }
}
