/* CZNull Benchmark Common Styles */

/* Import modal fix styles */
@import url('modal-fix.css');
@import url('fullscreen-button-fix.css');

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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    --warning-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --danger-gradient: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    --dark-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --nav-height: 64px;
    --panel-top: calc(var(--nav-height) + 20px);
    --mobile-panel-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Canvas Styles */
.benchmark-canvas {
    display: block;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* Control Panel Base */
.control-panel {
    position: fixed;
    top: var(--panel-top);
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
    padding: 24px;
    border-radius: 20px;
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    min-width: 360px;
    max-width: 420px;
    max-height: calc(100vh - var(--panel-top) - 40px);
    z-index: 100;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 100px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: slideInRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for control panel */
.control-panel::-webkit-scrollbar {
    width: 8px;
}

.control-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c8ff0 0%, #8a5db5 100%);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Panel Header */
.panel-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* Control Sections */
.control-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.control-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 1px;
}

/* Control Groups */
.control-group {
    margin-bottom: 20px;
}

.control-label {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Slider Styles */
.slider-container {
    position: relative;
}

.slider, input[type="range"] {
    width: 100%;
    height: 40px;
    -webkit-appearance: none;
    background: transparent;
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-track, input[type="range"]::-webkit-slider-track {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, rgba(102, 126, 234, 0.2) 0%, rgba(102, 126, 234, 0.1) 100%);
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.slider::-webkit-slider-thumb, input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -7px;
    box-shadow: 
        0 2px 10px rgba(102, 126, 234, 0.5),
        0 0 20px rgba(102, 126, 234, 0.3);
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover, input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.7),
        0 0 30px rgba(102, 126, 234, 0.5);
}

/* Firefox support */
.slider::-moz-range-track, input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, rgba(102, 126, 234, 0.2) 0%, rgba(102, 126, 234, 0.1) 100%);
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb, input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 
        0 2px 10px rgba(102, 126, 234, 0.5),
        0 0 20px rgba(102, 126, 234, 0.3);
    transition: all 0.2s;
}

.slider::-moz-range-thumb:hover, input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.7),
        0 0 30px rgba(102, 126, 234, 0.5);
}

.slider-value {
    text-align: right;
    font-size: 14px;
    color: #667eea;
    margin-top: 6px;
    font-weight: 600;
    font-feature-settings: "tnum";
}

/* Select Dropdown */
.select {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.select:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(102, 126, 234, 0.08) 100%);
    border-color: rgba(102, 126, 234, 0.5);
}

.select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 20px;
    margin-top: 12px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: var(--border-hover);
}

.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;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.stat-card:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-feature-settings: "tnum";
}

.stat-unit {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 4px;
    font-weight: 400;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 16px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.good {
    background: #4ade80;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.6);
}

.status-dot.fair {
    background: #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

.status-dot.poor {
    background: #f87171;
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.6);
}

@keyframes pulse {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

.status-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Textarea */
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
    margin-top: 8px;
}

textarea:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: 80px;
}

/* Progress Bar */
.progress-container {
    margin: 20px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label span {
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Performance Metrics Card */
.performance-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.metric-unit {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: normal;
}

/* Quality Selector */
.quality-selector {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.quality-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.quality-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.quality-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Resolution Scale */
.resolution-scale {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.scale-indicators {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.scale-indicator {
    font-size: 10px;
    color: var(--text-tertiary);
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.scale-indicator.active {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

/* Custom Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(17, 17, 17, 0.98) 100%);
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--border-color);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.7),
        0 0 100px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: slideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-content {
    margin-bottom: 24px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.modal-stat {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(102, 126, 234, 0.05) 100%);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.modal-stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.modal-stat-value {
    font-size: 24px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    border: none;
}

.modal-btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.modal-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

/* Info Panel */
.info-panel {
    position: fixed;
    top: var(--panel-top);
    left: 20px;
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
    padding: 20px;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    max-width: 320px;
    z-index: 100;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: slideInLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.info-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 12px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Navigation Styles (matching main site) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    transition: all 0.3s ease;
    background: linear-gradient(to right, rgba(17, 24, 39, 0.95), rgba(3, 7, 18, 0.95), rgba(0, 0, 0, 0.95));
    backdrop-filter: blur(16px);
}

.navbar .container {
    max-width: 1536px;
    margin: 0 auto;
    padding: 0 1rem;
}

.navbar .flex {
    display: flex;
}

.navbar .items-center {
    align-items: center;
}

.navbar .justify-between {
    justify-content: space-between;
}

.navbar .space-x-2 > * + * {
    margin-left: 0.5rem;
}

.navbar .space-x-1 > * + * {
    margin-left: 0.25rem;
}

.navbar .group {
    position: relative;
}

.navbar .min-w-0 {
    min-width: 0;
}

.navbar .flex-shrink-0 {
    flex-shrink: 0;
}

.navbar .relative {
    position: relative;
}

.navbar .absolute {
    position: absolute;
}

.navbar .inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.navbar .rounded-full {
    border-radius: 9999px;
}

.navbar .rounded-xl {
    border-radius: 0.75rem;
}

.navbar .rounded-lg {
    border-radius: 0.5rem;
}

.navbar .object-cover {
    object-fit: cover;
}

.navbar .blur-xl {
    filter: blur(24px);
}

.navbar .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar .bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.navbar .from-purple-400 {
    --tw-gradient-from: #a78bfa;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(167, 139, 250, 0));
}

.navbar .via-pink-500 {
    --tw-gradient-stops: var(--tw-gradient-from), #ec4899, var(--tw-gradient-to, rgba(236, 72, 153, 0));
}

.navbar .to-purple-600 {
    --tw-gradient-to: #9333ea;
}

.navbar .bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

.navbar .text-transparent {
    color: transparent;
}

.navbar .from-gray-900 {
    --tw-gradient-from: #111827;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(17, 24, 39, 0));
}

.navbar .via-gray-950 {
    --tw-gradient-stops: var(--tw-gradient-from), #030712, var(--tw-gradient-to, rgba(3, 7, 18, 0));
}

.navbar .to-black {
    --tw-gradient-to: #000000;
}

.navbar .backdrop-blur-xl {
    backdrop-filter: blur(24px);
}

.navbar .backdrop-blur-lg {
    backdrop-filter: blur(16px);
}

.navbar .shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.navbar .border-b {
    border-bottom-width: 1px;
}

.navbar .border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar .shadow-purple-500\/20 {
    box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.2);
}

.navbar .from-purple-500\/20 {
    --tw-gradient-from: rgba(168, 85, 247, 0.2);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(168, 85, 247, 0));
}

.navbar .to-pink-500\/20 {
    --tw-gradient-to: rgba(236, 72, 153, 0.2);
}

.navbar .border-purple-500\/30 {
    border-color: rgba(168, 85, 247, 0.3);
}

.navbar .text-purple-400 {
    color: #a78bfa;
}

.navbar .h-14 {
    height: 3.5rem;
}

.navbar .h-16 {
    height: 4rem;
}

.navbar .h-6 {
    height: 1.5rem;
}

.navbar .w-6 {
    width: 1.5rem;
}

.navbar .h-8 {
    height: 2rem;
}

.navbar .w-8 {
    width: 2rem;
}

.navbar .h-4 {
    height: 1rem;
}

.navbar .w-4 {
    width: 1rem;
}

.navbar .h-5 {
    height: 1.25rem;
}

.navbar .w-5 {
    width: 1.25rem;
}

.navbar .h-10 {
    height: 2.5rem;
}

.navbar .w-10 {
    width: 2.5rem;
}

.navbar .h-11 {
    height: 2.75rem;
}

.navbar .w-11 {
    width: 2.75rem;
}

.navbar .text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.navbar .text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.navbar .text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.navbar .text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.navbar .font-bold {
    font-weight: 700;
}

.navbar .font-medium {
    font-weight: 500;
}

.navbar .px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.navbar .px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.navbar .py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar .py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar .py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar .mx-2 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.navbar .mb-2 {
    margin-bottom: 0.5rem;
}

.navbar .min-h-\[48px\] {
    min-height: 48px;
}

.navbar .text-gray-400 {
    color: #9ca3af;
}

.navbar .text-white {
    color: #ffffff;
}

.navbar .hover\:text-white:hover {
    color: #ffffff;
}

.navbar .hover\:bg-white\/5:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.navbar .hover\:bg-white\/10:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .hover\:bg-white\/20:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar .hover\:bg-white\/30:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.navbar .active\:bg-white\/10:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .active\:bg-white\/30:active {
    background-color: rgba(255, 255, 255, 0.3);
}

.navbar .hover\:bg-purple-400\/30:hover {
    background-color: rgba(167, 139, 250, 0.3);
}

.navbar .hover\:border:hover {
    border-width: 1px;
}

.navbar .hover\:border-white\/10:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar .border {
    border-width: 1px;
}

.navbar .border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2);
}

.navbar .border-white\/5 {
    border-color: rgba(255, 255, 255, 0.05);
}

.navbar .transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .duration-300 {
    transition-duration: 300ms;
}

.navbar .active\:scale-95:active {
    transform: scale(0.95);
}

.navbar .transform {
    transform: translateZ(0);
}

.navbar .touch-manipulation {
    touch-action: manipulation;
}

.navbar .hidden {
    display: none;
}

.navbar .flex {
    display: flex;
}

.navbar .flex-1 {
    flex: 1 1 0%;
}

.navbar .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Navigation Desktop/Mobile Visibility */
.nav-desktop {
    display: block !important; /* Always show desktop navigation */
}

.nav-mobile {
    display: none !important; /* Always hide mobile button */
}

.nav-mobile-menu {
    display: none !important; /* Always hide mobile menu */
}

/* Mobile Menu Button Styling */
#mobileMenuBtn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a78bfa;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#mobileMenuBtn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
}

#mobileMenuBtn:active {
    transform: scale(0.95);
}

#mobileMenuBtn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    color: currentColor;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: block;
    }
    
    .nav-mobile {
        display: none !important;
    }
    
    .nav-mobile-menu {
        display: none !important;
    }
    
    .navbar .sm\:h-16 {
        height: 4rem;
    }
    
    .navbar .sm\:h-8 {
        height: 2rem;
    }
    
    .navbar .sm\:w-8 {
        width: 2rem;
    }
    
    .navbar .sm\:h-11 {
        height: 2.75rem;
    }
    
    .navbar .sm\:w-11 {
        width: 2.75rem;
    }
    
    .navbar .sm\:text-xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
    
    .navbar .sm\:px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar .sm\:py-4 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .navbar .sm\:space-x-2 > * + * {
        margin-left: 0.5rem;
    }
}

/* Mobile Control Panel Styles */
@media (max-width: 768px) {
    /* Prevent body scroll on mobile */
    body {
        overflow: hidden !important;
        position: relative !important;
        height: 100vh !important;
    }
    
    /* Main container should not scroll */
    .benchmark-container {
        overflow: hidden !important;
        height: 100vh !important;
        position: relative !important;
    }
    
    /* 确保移动端悬浮按钮不被底部导航遮挡 */
    .mobile-panel-toggle,
    #mobilePanelToggle,
    button.mobile-panel-toggle,
    button#mobilePanelToggle {
        bottom: 100px !important;
        z-index: 10000 !important;
        position: fixed !important;
    }
    
    /* Mobile Modal Responsive Adjustments */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
        z-index: 9999; /* Keep modal below mobile toggle button (z-index: 10001) */
    }
    
    .modal {
        max-height: calc(85vh - 60px);
        height: auto;
        max-width: 100%;
        width: 100%;
        margin: 0;
        margin-bottom: 60px;
        border-radius: 20px 20px 0 0;
        display: flex;
        flex-direction: column;
        padding: 24px;
        animation: slideUp 0.3s ease-out;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .modal-header {
        flex-shrink: 0;
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(17, 17, 17, 0.98) 100%);
        margin: -24px -24px 24px -24px;
        padding: 24px 24px 16px 24px;
        z-index: 10;
        border-radius: 20px 20px 0 0;
    }
    
    .modal-content, .modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 16px;
        padding-right: 5px;
        max-height: calc(90vh - 200px);
    }
    
    /* Custom scrollbar for modal content on mobile */
    .modal-content::-webkit-scrollbar,
    .modal-body::-webkit-scrollbar {
        width: 4px;
    }
    
    .modal-content::-webkit-scrollbar-track,
    .modal-body::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 2px;
    }
    
    .modal-content::-webkit-scrollbar-thumb,
    .modal-body::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.3);
        border-radius: 2px;
    }
    
    .modal-stats {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .modal-footer {
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(17, 17, 17, 0.98) 100%);
        margin: 16px -24px -24px -24px;
        padding: 20px 24px 30px 24px; /* Increased bottom padding */
        border-top: 1px solid var(--border-color);
        z-index: 10;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-btn {
        width: 100%;
        padding: 14px;
        font-size: 14px;
        min-height: 48px;
    }
    
    /* Ensure stats are readable on mobile */
    .modal-stat {
        padding: 14px;
    }
    
    .modal-stat-value {
        font-size: 20px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-subtitle {
        font-size: 13px;
    }
    
    .control-panel {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto !important;
        height: 80vh;
        max-height: 80vh;
        min-width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        transform: translateY(0);
        transition: transform 0.3s ease;
        overflow: visible !important;
        z-index: 9999 !important;
    }
    
    .control-panel.mobile-panel {
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
        background: linear-gradient(135deg, rgba(17, 17, 17, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
        display: flex;
        flex-direction: column;
    }
    
    .control-panel.mobile-panel.closed {
        transform: translateY(calc(100% - var(--mobile-panel-height)));
    }
    
    .mobile-handle {
        position: relative;
        flex-shrink: 0;
        background: transparent;
        padding: 10px 20px;
        cursor: grab;
        user-select: none;
        touch-action: none; /* Only handle should prevent scrolling */
    }
    
    
    .mobile-handle:active {
        cursor: grabbing;
    }
    
    .handle-bar {
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
        margin: 0 auto;
    }
    
    /* Scrollable content wrapper - force scrolling to work */
    .mobile-panel-content {
        flex: 1 1 auto;
        min-height: 0; /* Critical for flex children to scroll */
        overflow-y: scroll !important; /* Force scroll instead of auto */
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 20px;
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); /* Increased to avoid floating button overlap */
        position: relative;
        touch-action: pan-y !important; /* Allow vertical scrolling */
        -webkit-transform: translateZ(0); /* Hardware acceleration */
        transform: translateZ(0);
        
        /* Fallback for older browsers */
        height: calc(100% - 60px); /* Subtract handle height */
    }
    
    /* Remove default panel padding on mobile when using wrapper */
    .control-panel.mobile-panel {
        padding: 0;
    }
    
    /* Ensure proper spacing for control sections on mobile */
    .control-panel.mobile-panel .control-section {
        margin-bottom: 20px;
    }
    
    .control-panel.mobile-panel .control-label {
        margin-bottom: 8px;
    }
    
    .control-panel.mobile-panel .btn {
        margin-top: 16px;
    }
    
    .control-panel.mobile-panel select,
    .control-panel.mobile-panel input[type="range"] {
        margin-bottom: 8px;
    }
    
    .mobile-toggle-btn {
        position: fixed;
        right: 20px;
        bottom: 20px;
        width: 48px;
        height: 48px;
        background: rgba(30, 30, 35, 0.95);
        border: 1px solid rgba(102, 126, 234, 0.4);
        border-radius: 50%;
        display: flex;
        align-items: center;
        z-index: 10001; /* Ensure button is always on top */
        pointer-events: auto !important; /* Ensure button is always clickable */
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s;
        backdrop-filter: blur(10px);
        color: #a78bfa;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        z-index: 10000;
    }
    
    .mobile-toggle-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.2);
    }
    
    .mobile-toggle-btn svg {
        transition: transform 0.3s;
    }
    
    .info-panel {
        display: none;
    }
    
    .modal {
        width: 95%;
        padding: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Touch-friendly sizes */
    .btn {
        min-height: 48px;
        font-size: 14px;
    }
    
    .select {
        min-height: 48px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .slider, input[type="range"] {
        min-height: 48px;
    }
    
    .quality-btn {
        min-height: 44px;
    }
    
    /* Adjust control sections for mobile */
    .control-section {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .section-label {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .control-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    /* Mobile-optimized performance card */
    .performance-card {
        padding: 12px;
    }
    
    .performance-grid {
        gap: 10px;
    }
    
    .metric-value {
        font-size: 20px;
    }
    
    /* Canvas adjustments */
    .benchmark-canvas {
        height: calc(100vh - var(--mobile-panel-height));
    }
    
    body {
        padding-top: 56px; /* Smaller nav on mobile */
    }
    
    .navbar {
        height: 56px;
    }
}

/* Landscape Mobile Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .control-panel {
        max-height: 60vh;
    }
    
    .mobile-handle {
        padding: 5px;
        margin-bottom: 5px;
    }
    
    .handle-bar {
        height: 3px;
        margin-bottom: 5px;
    }
    
    .control-section {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn, .select, .quality-btn {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }
    
    .stat-card:hover {
        transform: none;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
        border-color: rgba(255, 255, 255, 0.05);
    }
    
    /* Improve slider touch area */
    .slider::-webkit-slider-thumb, input[type="range"]::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
        margin-top: -11px;
    }
    
    .slider::-moz-range-thumb, input[type="range"]::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
}

/* High DPI Screen Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .control-panel {
        border-width: 0.5px;
    }
    
    .stat-card, .performance-card {
        border-width: 0.5px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
        --panel-top: calc(var(--nav-height) + 10px);
    }
}

