* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --hn-orange: #ff6600;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: #000;
    height: 100%;
    width: 100%;
    position: fixed;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    z-index: 1000;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    transition: opacity 0.3s ease;
}

.brand-logo .highlight-qr {
    color: var(--hn-orange);
}

/* Mobile logo positioning */
@media (max-width: 768px) {
    .brand-logo {
        top: auto;
        bottom: 20px;
        left: 20px;
        font-size: 18px; /* Slightly smaller text */
    }
    
    /* When preview is active, move logo above the QR code */
    .brand-logo.preview-active {
        bottom: auto;
        top: calc(50% - min(45vw, 45vh) - 40px); /* Position above QR code */
        left: 20px;
        z-index: 101; /* Higher than preview but lower than controls */
    }
    
    /* Hide fullscreen button on mobile */
    #fullscreenBtn {
        display: none;
    }
}

.button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

/* Default visibility for buttons - start hidden and show with JS */
.button-container.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Keep previous fullscreen behavior compatible */
:fullscreen .button-container {
    opacity: 0;
    pointer-events: none;
}

:fullscreen .button-container.active,
:fullscreen .button-container.visible {
    opacity: 1;
    pointer-events: auto;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    padding: 0;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.control-btn .material-icons {
    color: white;
    font-size: 24px;
}

/* Fullscreen-only buttons */
.fullscreen-only {
    display: none;
}

:fullscreen .fullscreen-only {
    display: flex;
}

.logoHidden {
    opacity: 0;
}

/* Add orange accent to active buttons */
.control-btn.active-option {
    background-color: var(--hn-orange);
}

/* DVD logo styling */
.dvd-logo {
    width: 24px;
    height: 24px;
    fill: white;
    /* Ensure the logo is visible */
    opacity: 1;
}

/* DVD mode active styling - make consistent with other buttons */
#dvdBtn.active-option .dvd-logo {
    fill: white; /* Keep the fill white always */
}

/* Body class for DVD mode */
body.has-dvd-mode {
    position: relative;
    /* Add a subtle visual indicator when DVD mode is active */
    background-color: #0a0a0a;
}

/* QR container styling for DVD mode */
.qr-container.dvd-mode {
    width: 150px;
    height: 150px;
    position: fixed;
    /* Ensure visibility */
    z-index: 500;
    transition: width 0.3s ease, height 0.3s ease;
}

.qr-container.dvd-mode.moving {
    transition: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
}

.qr-container {
    display: grid;
    gap: 1px;
    background-color: #000;
    padding: 1px;
    aspect-ratio: 1;
    width: min(90vw, 90vh);
    height: min(90vw, 90vh);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease-out;
}

.qr-cell {
    width: 100%;
    height: 100%;
    transition: background-color 0.3s;
}

.qr-cell.black {
    background-color: #000;
}

.qr-cell.white {
    background-color: #fff;
}

.info-overlay {
    position: fixed;
    bottom: 20px;
    left: 20px;
    color: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    text-align: left;
    max-width: 400px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.info-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.info-overlay h1 {
    margin-bottom: 20px;
    color: white;
    font-size: 32px;
}

.info-overlay h1 .highlight-qr {
    color: var(--hn-orange);
}

.info-overlay p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.info-overlay .features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.info-overlay .features span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.info-overlay .features .material-icons {
    font-size: 16px;
}

.info-overlay .credits {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 20px;
}

.info-overlay .credits a {
    color: var(--hn-orange);
    text-decoration: none;
}

.info-overlay .credits a:hover {
    text-decoration: underline;
}

/* Hide info overlay in fullscreen */
:fullscreen .info-overlay {
    opacity: 0;
    pointer-events: none;
}

:fullscreen .info-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.info-overlay .scanning-tips {
    margin: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

.info-overlay .scanning-tips h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: white;
}

.info-overlay .scanning-tips p {
    font-size: 14px;
    margin-bottom: 8px;
}

.info-overlay .scanning-tips ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.info-overlay .scanning-tips li {
    font-size: 14px;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.9);
}

.preview-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    width: 600px;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    color: white;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.preview-container.active {
    opacity: 1;
    pointer-events: auto;
}

.preview-content {
    color: white;
    font-size: 14px;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    word-break: break-word;
    padding-right: 10px;
}

/* Custom scrollbar for the preview content */
.preview-content::-webkit-scrollbar {
    width: 6px;
}

.preview-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.preview-content::-webkit-scrollbar-thumb {
    background: var(--hn-orange);
    border-radius: 3px;
}

.preview-content a {
    color: var(--hn-orange) !important;
    text-decoration: none;
}

.preview-content a:hover {
    text-decoration: underline;
}

.preview-content strong {
    color: var(--hn-orange);
    font-weight: bold;
}

/* Loading title animation */
.loading-title {
    color: rgba(255, 255, 255, 0.8);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.filter-menu, .speed-menu {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    min-width: 100px;
}

/* For mobile screens, ensure menus are properly sized */
@media (max-width: 768px) {
    .filter-menu, .speed-menu {
        min-width: 80px;
        max-width: 110px;
    }
}

.filter-menu.active, .speed-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.filter-option, .speed-option {
    background: none;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}

.filter-option:hover, .speed-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-option.active, .speed-option.active {
    background: rgba(255, 255, 255, 0.2);
}

.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-indicator.active {
    opacity: 1;
}

.loading-indicator .material-icons {
    font-size: 48px;
}

.spin {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.qr-error {
    color: var(--hn-orange);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Adjust for mobile screens */
@media (max-width: 768px) {
    .preview-container {
        width: 95%;
        max-width: 95%;
        padding: 15px;
        bottom: 15px;
    }
    
    .preview-content {
        max-height: 200px;
        font-size: 13px;
    }
} 