/* Global Styles */
html {
    overflow: hidden !important;
}

body {
    background-color: #0B0F19;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
    color: #F3F4F6;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow: hidden !important;
}

/* Main内容区域滚动条 */
main::-webkit-scrollbar {
    width: 16px !important;
    height: 16px !important;
}

main::-webkit-scrollbar-track {
    background: #1F2937 !important;
    border-left: 1px solid rgba(59, 130, 246, 0.2) !important;
}

main::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3B82F6, #8B5CF6) !important;
    border-radius: 8px !important;
    border: 3px solid #1F2937 !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important;
}

main::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #60A5FA, #A78BFA) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.8) !important;
}

main::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #2563EB, #7C3AED) !important;
}

/* Scrollbar - 全局滚动条样式（强制显示）*/
html, body, main, .overflow-y-scroll, .overflow-y-auto {
    scrollbar-width: thin;
    scrollbar-color: #3B82F6 #1F2937;
}

::-webkit-scrollbar {
    width: 16px !important;
    height: 16px !important;
}

::-webkit-scrollbar-track {
    background: #1F2937 !important;
    border-left: 1px solid rgba(59, 130, 246, 0.2) !important;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3B82F6, #8B5CF6) !important;
    border-radius: 8px !important;
    border: 3px solid #1F2937 !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #60A5FA, #A78BFA) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.8) !important;
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #2563EB, #7C3AED) !important;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Custom Scrollbar for Cards */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.3) rgba(17, 24, 39, 0.5);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.5);
    border-radius: 10px;
    margin: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.5), rgba(139, 92, 246, 0.5));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.8), rgba(139, 92, 246, 0.8));
    background-clip: padding-box;
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(31, 41, 55, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(31, 41, 55, 0.6);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* Gradient Text */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to right, #60A5FA, #A78BFA);
}

/* Custom Inputs */
.input-dark {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.4);
    color: white;
    transition: all 0.2s;
}

.input-dark:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

/* Custom Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
    transition: all 0.3s;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

/* Table Styles */
.table-row-hover:hover td {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Loading Animation */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid #3B82F6;
    width: 24px;
    height: 24px;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Additional Animations */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bg-grid-pattern {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Animated Background Glow */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Glow Button */
.btn-glow {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
    transition: all 0.2s ease;
}

.btn-glow:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.23);
}

.btn-glow:active {
    transform: translateY(1px);
}

/* Monitor Page Styles */
.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.control-enabled {
    cursor: crosshair;
}

.click-effect {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(56, 189, 248, 0.8);
    background: rgba(56, 189, 248, 0.2);
    border-radius: 50%;
    pointer-events: none;
    animation: clickPulse 0.5s ease-out forwards;
    z-index: 50;
    transform: translate(-50%, -50%);
}

@keyframes clickPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.swipe-line {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.8), rgba(99, 102, 241, 0.8));
    pointer-events: none;
    animation: swipeFade 0.8s ease-out forwards;
    border-radius: 2px;
    z-index: 40;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

@keyframes swipeFade {
    0% {
        opacity: 1;
        width: 0;
    }
    20% {
        opacity: 1;
        width: var(--length);
    }
    100% {
        opacity: 0;
        width: var(--length);
    }
}

.device-frame {
    box-shadow: 0 0 0 2px #334155, 0 20px 50px -10px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.device-frame:hover {
    box-shadow: 0 0 0 2px #38bdf8, 0 25px 60px -12px rgba(0, 0, 0, 0.6);
}
