.btn-test-color {
    height: 50px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.btn-test-color:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-test-color:active {
    transform: translateY(0);
}

/* Test Screen */
.test-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    cursor: none;
}

.test-screen.active {
    display: block;
}

.test-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.test-screen:hover .test-info {
    opacity: 1;
}

.test-color-name {
    font-size: 2rem;
    font-weight: bold;
    padding: 10px 30px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 8px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.test-instructions {
    font-size: 1rem;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.test-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(220, 53, 69, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.test-screen:hover .test-close-btn {
    opacity: 1;
}

.test-close-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.test-close-btn:active {
    transform: scale(0.95);
}

/* Patterns */
.test-screen.pattern-grid {
    background-image:
        repeating-linear-gradient(0deg, #000 0px, #000 1px, transparent 1px, transparent 20px),
        repeating-linear-gradient(90deg, #000 0px, #000 1px, transparent 1px, transparent 20px);
    background-color: #fff;
}

.test-screen.pattern-horizontal {
    background-image: repeating-linear-gradient(0deg, #000 0px, #000 2px, #fff 2px, #fff 20px);
}

.test-screen.pattern-vertical {
    background-image: repeating-linear-gradient(90deg, #000 0px, #000 2px, #fff 2px, #fff 20px);
}

.test-screen.pattern-gradient {
    background: linear-gradient(to right, #000, #fff);
}

/* Fullscreen fixes */
.test-screen:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
}

.test-screen:-moz-full-screen {
    width: 100vw;
    height: 100vh;
}

.test-screen:fullscreen {
    width: 100vw;
    height: 100vh;
}

/* Keyboard shortcuts help */
kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.875em;
    font-weight: 600;
    line-height: 1;
    color: #212529;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', monospace;
}

[data-bs-theme="dark"] kbd {
    color: #f8f9fa;
    background-color: #343a40;
    border-color: #495057;
}

/* Auto rotate indicator */
#autoRotateBtn.active {
    background: var(--bs-success);
    color: white;
    border-color: var(--bs-success);
}

#autoRotateBtn.active .fsvg {
    filter: brightness(0) invert(1);
    animation: rotating 2s linear infinite;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .test-color-name {
        font-size: 1.5rem;
        padding: 8px 20px;
    }

    .test-instructions {
        font-size: 0.875rem;
        padding: 6px 15px;
    }

    .test-close-btn {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    .btn-test-color {
        height: 45px;
        font-size: 0.9rem;
    }
}

/* Print hide */
@media print {
    .test-screen {
        display: none !important;
    }
}
