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

html, body {
    margin: 0;
    padding: 0;
    background-color: #000;
    height: 100%;
    width: 100%;
    position: fixed;
    overflow: hidden;
}

/* Add boundary visualization when bounds mode is active */
body.show-bounds {
    border: 2px solid rgba(255, 0, 0, 0.3);
    position: relative;
}

/* Add boundary visualization when in DVD mode */
body.has-dvd-mode {
    position: relative;
}

/* Remove the separate top boundary line since we're using the window top */
body.has-dvd-mode::after {
    display: none;
}

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

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 2rem;
}

.input-section {
    margin-bottom: 2rem;
}

input {
    padding: 0.5rem;
    font-size: 1rem;
    width: 300px;
    margin-right: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

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

/* Default visibility for buttons in all non-fullscreen modes */
.button-container {
    opacity: 1;
    pointer-events: auto;
}

/* Hide buttons in any fullscreen mode */
:fullscreen .button-container {
    opacity: 0;
    pointer-events: none;
}

/* Show buttons when active in any fullscreen mode */
:fullscreen .button-container.active {
    opacity: 1;
    pointer-events: auto;
}

/* Remove all other button visibility overrides */

.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: all 0.3s ease;
    padding: 0;
    position: relative;
}

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

.control-btn.active {
    background: rgba(100, 200, 255, 0.4);
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.7);
    transform: scale(1.05);
}

/* Add indicator dot for active buttons */
.control-btn.active::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* Different colors for different mode buttons */
#colorBtn.active {
    background: rgba(255, 100, 200, 0.4);
    box-shadow: 0 0 10px rgba(255, 100, 200, 0.7);
}

#dvdBtn.active {
    background: rgba(255, 165, 0, 0.4);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.7);
}

#boundsBtn.active {
    background: rgba(255, 80, 80, 0.4);
    box-shadow: 0 0 10px rgba(255, 80, 80, 0.7);
}

#clockModeBtn.active {
    background: rgba(80, 200, 120, 0.4);
    box-shadow: 0 0 10px rgba(80, 200, 120, 0.7);
}

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

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

.qr-container.dvd-mode {
    width: 150px;
    height: 150px;
    position: fixed;
}

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

.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: 900;
    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;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

/* Make sure info overlay is visible even in fullscreen when active */
:fullscreen .info-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.info-overlay h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: white;
    font-weight: bold;
    letter-spacing: 0.5px;
}

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

.info-overlay .features {
    display: flex;
    gap: 15px;
    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;
    font-weight: normal;
    line-height: 1.4;
}

.info-overlay .credits a {
    color: white;
    text-decoration: none;
}

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

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

/* Show info overlay when active in fullscreen */
:fullscreen .info-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.dvd-logo {
    width: 32px;
    height: 32px;
    fill: currentColor;
    transform: scale(1.5);
}

.features .dvd-logo {
    width: 20px;
    height: 20px;
    transform: none;
}

.credits {
    font-size: 12px;
    opacity: 0.7;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
}

.credits a {
    color: white;
    text-decoration: none;
}

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

.site-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 900;
    transition: opacity 0.3s ease;
    opacity: 1;
    pointer-events: auto;
}

.site-logo.hidden {
    opacity: 0;
    pointer-events: none;
}

.site-logo h2 {
    color: white;
    font-size: 24px;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Hide logo toggle button in regular mode */
.fullscreen-only {
    display: none;
}

/* Show logo toggle button only in fullscreen */
:fullscreen .fullscreen-only {
    display: flex;
}

/* Make logo always visible in fullscreen unless turned off */
:fullscreen .site-logo {
    opacity: 1;
    pointer-events: auto;
}

/* Only hide logo in fullscreen when specifically toggled off */
:fullscreen .site-logo.hidden {
    opacity: 0;
    pointer-events: none;
}

#logoToggleBtn.active {
    background: rgba(130, 130, 255, 0.4);
    box-shadow: 0 0 10px rgba(130, 130, 255, 0.7);
}

/* Hide logo on smaller screens to prevent button overlap */
@media (max-width: 768px) {
    .site-logo, 
    body .site-logo, 
    html .site-logo,
    :fullscreen .site-logo {
        position: fixed !important;
        top: auto !important; /* Force override any other positioning */
        bottom: 20px !important;
        left: 20px !important;
        transform: none !important; /* Ensure no transform is applied */
        z-index: 899 !important; /* Below info-overlay (900) to prevent conflicts */
    }
    
    /* Hide logo when info overlay is active on mobile to prevent overlap */
    .info-overlay.active + .site-logo,
    .info-overlay.active ~ .site-logo,
    body .info-overlay.active ~ .site-logo {
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Alternative more aggressive approach for mobile targeting */
@media screen and (max-device-width: 768px) {
    html body .site-logo {
        position: fixed !important;
        top: auto !important;
        bottom: 20px !important;
        left: 20px !important;
        transform: none !important;
        z-index: 899 !important;
    }
    
    html body .mobile-detected .site-logo {
        position: fixed !important;
        top: auto !important;
        bottom: 20px !important;
        left: 20px !important;
    }
    
    /* Hide fullscreen button on mobile devices */
    #fullscreenBtn {
        display: none !important;
    }
} 