/**
 * FPS Controller Component - Shared CSS
 * 共通FPS制御パネルのスタイル定義
 * 
 * Features:
 * - Collapsible panel with toggle functionality
 * - Consistent visual design across all animation pages
 * - Responsive layout with smooth animations
 * - Accessibility-friendly hover states
 */

/* FPS制御パネル - メインコンテナ */
.fps-control-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px 0 0 8px;
    z-index: 1000;
    font-family: 'Orbitron', monospace;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    max-width: 250px;
}

/* 折りたたみ状態 */
.fps-control-panel.collapsed {
    transform: translateX(calc(-100% + 1px));
}

/* パネルコンテンツエリア */
.fps-control-content {
    padding: 15px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fps-control-panel.collapsed .fps-control-content {
    opacity: 0;
    pointer-events: none;
}

/* トグルボタン */
.fps-toggle {
    position: absolute;
    right: -29px;
    top: -1px;
    bottom: -1px;
    width: 30px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.fps-toggle:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* トグル矢印 */
.fps-toggle-arrow {
    color: #00ffff;
    font-size: 10px;
    font-weight: bold;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(0, 255, 255, 0.5));
}

.fps-control-panel.collapsed .fps-toggle-arrow {
    transform: rotate(180deg);
}

/* トグルテキスト */
.fps-toggle-text {
    color: #00ffff;
    font-size: 9px;
    font-weight: 500;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

/* パネル内要素のスタイル */
.fps-control-panel h3 {
    margin: 0 0 10px 0;
    color: #00ffff;
    font-size: 0.9rem;
}

.fps-selector {
    margin-bottom: 10px;
}

.fps-selector select {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 4px;
    padding: 5px;
    font-family: inherit;
    font-size: 0.8rem;
    width: 100%;
}

.fps-selector select:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.fps-display {
    background: rgba(0, 20, 20, 0.9);
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
}

.fps-current {
    color: #00ff80;
    font-weight: bold;
    font-size: 1.1rem;
}

.fps-target {
    color: #ffffff;
    font-size: 0.8rem;
    margin-top: 2px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .fps-control-panel {
        top: 10px;
        left: 10px;
    }
    
    .fps-panel-content {
        padding: 10px;
        min-width: 120px;
        min-height: 110px;
    }
    
    .fps-control-panel h3 {
        font-size: 0.8rem;
    }
    
    .fps-selector select {
        font-size: 0.7rem;
        padding: 4px;
    }
    
    .fps-current {
        font-size: 1rem;
    }
    
    .fps-target {
        font-size: 0.7rem;
    }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
    .fps-control-panel,
    .fps-panel-toggle,
    .fps-toggle-arrow {
        transition: none;
    }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .fps-control-panel {
        border-color: #ffffff;
        background: rgba(0, 0, 0, 1);
    }
    
    .fps-panel-toggle {
        background: #ffffff;
        border-color: #ffffff;
    }
    
    .fps-toggle-arrow,
    .fps-toggle-text {
        color: #000000;
    }
}