/* SCREEN-COMET Professional Cinema System */

/* リセットとベース設定 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* メインコンテナ */
.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* モバイル警告 */
.mobile-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mobile-warning-content {
    text-align: center;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    border: 2px solid #333;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.mobile-warning-content i {
    font-size: 4rem;
    color: #ff6b6b;
    margin-bottom: 1.5rem;
}

.mobile-warning-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.mobile-warning-content p {
    font-size: 1.2rem;
    color: #cccccc;
}

/* ヘッダー */
.cinema-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: 2rem 3rem;
    border-bottom: 2px solid #333;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.language-selector select {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #444;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    border-color: #666;
    background: #333;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #cccccc;
}

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

.status-dot.ready {
    background: #4ade80;
}

.status-dot.connecting {
    background: #fbbf24;
}

.status-dot.error {
    background: #ef4444;
}

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

.brand-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-container i {
    font-size: 3rem;
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.logo-container h1 {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    font-weight: 300;
    letter-spacing: 1px;
}

.cinema-specs {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cccccc;
    font-size: 0.9rem;
}

.spec-item i {
    color: #ffd93d;
    font-size: 1.1rem;
}

/* メインコンテンツ */
.cinema-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 2rem;
    padding: 2rem 3rem;
    background: #0a0a0a;
}

/* パネル共通スタイル */
.media-panel,
.preview-panel,
.control-panel,
.status-panel,
.info-panel {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid #333;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.media-panel:hover,
.preview-panel:hover,
.control-panel:hover,
.status-panel:hover,
.info-panel:hover {
    border-color: #444;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.panel-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: #333;
    border: 1px solid #444;
    color: #cccccc;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-icon:hover {
    background: #444;
    color: #ffffff;
    border-color: #555;
}

/* メディア管理パネル */
.media-panel {
    grid-column: 1;
    grid-row: 1;
}

.file-upload-zone {
    border: 2px dashed #444;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.file-upload-zone:hover,
.file-upload-zone.drag-over {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
    transform: translateY(-2px);
}

.upload-content i {
    font-size: 3rem;
    color: #666;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.file-upload-zone:hover .upload-content i {
    color: #ff6b6b;
    transform: scale(1.1);
}

.upload-content h3 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.upload-content p {
    color: #cccccc;
    margin-bottom: 1rem;
}

.upload-specs {
    font-size: 0.85rem;
    color: #888;
}

.file-info-card {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-preview i {
    font-size: 2rem;
    color: #ff6b6b;
}

.file-details h4 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.file-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #cccccc;
}

.btn-remove {
    background: #ef4444;
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* プレビューパネル */
.preview-panel {
    grid-column: 2;
    grid-row: 1 / 3;
}

.video-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccccc;
}

.overlay-content {
    text-align: center;
}

.overlay-content i {
    font-size: 4rem;
    color: #666;
    margin-bottom: 1rem;
}

.overlay-content p {
    font-size: 1.1rem;
}

/* 制御パネル */
.control-panel {
    grid-column: 1;
    grid-row: 2;
}

.system-time {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #ffd93d;
    font-weight: 600;
}

.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: 1px solid #444;
    border-radius: 12px;
    background: #2a2a2a;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #1a1a1a;
}

.control-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.control-btn.primary {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.control-btn.primary:not(:disabled):hover {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.control-btn.success {
    border-color: #10b981;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.control-btn.success:not(:disabled):hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.control-btn.warning {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.control-btn.warning:not(:disabled):hover {
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.control-btn.danger {
    border-color: #ef4444;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.control-btn.danger:not(:disabled):hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.control-btn i {
    font-size: 1.1rem;
}

/* ステータスパネル */
.status-panel {
    grid-column: 1 / 3;
    grid-row: 3;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.status-item:hover {
    border-color: #555;
    background: #333;
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.status-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
}

.status-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.status-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.status-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.status-text {
    flex: 1;
}

.status-label {
    font-size: 0.85rem;
    color: #cccccc;
    margin-bottom: 0.25rem;
}

.status-value {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

/* プロモ設定パネル */
.promo-settings {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
}

.promo-settings h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.promo-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.promo-input-group input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #ffffff;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.promo-input-group input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.promo-input-group button {
    background: #ff6b6b;
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.promo-input-group button:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

/* 隠し要素 */
#videoFile {
    display: none;
}

.hidden {
    display: none !important;
}

/* 同期ステータス */
.sync-status {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #e9ecef;
}

.sync-status h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #495057;
    font-size: 1.3rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.screen-label {
    font-weight: bold;
    color: #495057;
}

.status-indicator {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    min-width: 80px;
}

.status-indicator.ready {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-indicator.connecting {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-indicator.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-indicator:not(.ready):not(.connecting):not(.error) {
    background: #e2e3e5;
    color: #6c757d;
    border: 1px solid #d6d8db;
}

/* フッター */
footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

footer p {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .control-panel {
        padding: 20px;
    }
    
    .control-buttons {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .status-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .file-label {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .control-buttons button {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.control-panel {
    animation: fadeIn 0.6s ease-out;
}

/* ホバーエフェクト */
.control-panel:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #1976D2, #1565C0);
}
