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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    position: relative;
}

.container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#timeCanvas {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
}

.controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-selector {
    display: flex;
    gap: 5px;
}

.mode-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.info-panel {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 300px;
}

.time-display {
    margin-bottom: 15px;
}

.current-time {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.time-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
}

.perspective-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.perspective-text strong {
    display: block;
    font-size: 18px;
    margin-bottom: 5px;
    color: #fff;
}

.interaction-hint {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 10;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .controls {
        top: 10px;
        padding: 5px;
        width: calc(100% - 20px);
        left: 10px;
        transform: none;
    }
    
    .mode-selector {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .mode-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .info-panel {
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
        padding: 15px;
    }
    
    .current-time {
        font-size: 24px;
    }
    
    .interaction-hint {
        display: none;
    }
}

/* 極小画面対応 */
@media (max-width: 400px) {
    .mode-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .current-time {
        font-size: 20px;
    }
    
    .perspective-text {
        font-size: 12px;
    }
    
    .perspective-text strong {
        font-size: 16px;
    }
}

/* タッチデバイスでのハイライト無効化 */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* アニメーション */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* カスタムスクロールバー（必要な場合） */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}