@charset "utf-8";
/* CSS Document */
 /* Base Styles */
        *, ::before, ::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        html, body {
            height: 100svh; overflow: hidden;
            font-family: "Inter", sans-serif;
        }
        
        /* Utility Classes */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem;
        }

#pre { width: 100%; position: fixed; bottom: 0; left: 0; z-index: 99999;}

#analysis-section,#reset-contrast-btn { display: none;}

#preview-frame { width: 100%;
            height: 60svh; position: fixed; top:50%; left: 0; transform: translateY(-50%);}

#image-preview { position: fixed; top:20px; right:20px; height: 10svh; z-index: 1; width: 10vh;}
#image-preview img { object-fit: contain; object-position: center; width: 100%; height: 100%;}

#video { object-fit: cover; object-position: center; width: 100%; height: 100%;position: fixed; top:0%; left: 0; }
        
        .bg-gray-50 { background-color: #f9fafb; }
        .bg-white { /*background-color: #ffffff; */}
        .bg-blue-500 { background-color: #3b82f6; }
        .bg-green-500 { background-color: #10b981; }
        .bg-red-500 { background-color: #ef4444; }
        .bg-purple-500 { background-color: #8b5cf6; }
        .bg-orange-500 { background-color: #f97316; }
        .bg-indigo-500 { background-color: #6366f1; }
        .bg-pink-500 { background-color: #ec4899; }
        .bg-yellow-500 { background-color: #eab308; }
        
        .text-white { color: #ffffff; }
        .text-gray-800 { color: #1f2937; }
        .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
        .text-xl { font-size: 1.25rem; line-height: 1.75rem; }
        .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
        .font-bold { font-weight: 700; }
        .font-semibold { font-weight: 600; }
        
        .min-h-screen { min-height: 100vh; }
        .h-screen { height: 100vh; }
        .w-full { width: 100%; }
        .max-w-md { max-width: 28rem; }
        .max-h-64 { max-height: 16rem; }
        
        .p-6 { padding: 1.5rem; }
        .p-4 { padding: 1rem; }
        .px-4 { padding-left: 1rem; padding-right: 1rem; }
        .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
        .mb-4 { margin-bottom: 1rem; }
        .mb-8 { margin-bottom: 2rem; }
        .mx-auto { margin-left: auto; margin-right: auto; }
        .mt-4 { margin-top: 1rem; }
        
        .flex { display: flex; }
        .grid { display: grid; }
        .hidden { display: none; }
        .block { display: block; }
        
        .flex-wrap { flex-wrap: wrap;justify-content: center;}
        .items-center { align-items: center; }
        .justify-center { justify-content: center; }
        .justify-between { justify-content: space-between; }
        .text-center { text-align: center; }

.none,#music-info,#music-section { display: none;}
        
        .rounded { border-radius: 0.25rem; }
        .rounded-lg { border-radius: 0.5rem; }
        .shadow-lg { 
            /*box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);*/
        }
        
        .gap-4 { gap: 1rem; }
        .gap-2 { gap: 0.5rem; }
        .cursor-pointer { cursor: pointer; }
        
        /* Button Styles */
        .btn {
            display: inline-block;
            padding: 0;
            border-radius: 50%; width: 70px; height: 70px; background-color: rgba(0,0,0,1);
            font-weight: 500;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
            text-decoration: none; text-indent: -9999px; background-position: center; background-repeat: no-repeat; background-size: 35px;
        }

#camera-btn { background-image: url("../img/camera.svg");}
#back-to-initial-btn,#back-from-camera-btn { background-image: url("../img/back.svg"); background-color: transparent;}
#play-btn { background-image: url("../img/play.svg");}
#play-btn { background-image: url("../img/play.svg");}
#stop-btn { background-image: url("../img/pause.svg");}
        
        .btn-primary { background-color: #3b82f6; color: white; }
        .btn-primary:hover { background-color: #2563eb; }
        .btn-success { background-color: #10b981; color: white; }
        .btn-success:hover { background-color: #059669; }
        .btn-danger { background-color: #ef4444; color: white; }
        .btn-danger:hover { background-color: #dc2626; }
        .btn-purple { background-color: #8b5cf6; color: white; }
        .btn-purple:hover { background-color: #7c3aed; }
        .btn-orange { background-color: #f97316; color: white; }
        .btn-orange:hover { background-color: #ea580c; }
        .btn-indigo { background-color: #6366f1; color: white; }
        .btn-indigo:hover { background-color: #4f46e5; }
        .btn-pink { background-color: #ec4899; color: white; }
        .btn-pink:hover { background-color: #db2777; }
        .btn-yellow { background-color: #eab308; color: white; }
        .btn-yellow:hover { background-color: #ca8a04; }
        .btn-secondary { background-color: #6b7280; color: white; }
        .btn-secondary:hover { background-color: #4b5563; }
        
        /* File Input */
        .file-input-wrapper {
            position: relative;
            display: inline-block;
            cursor: pointer;
             background-color: rgba(0,0,0,1);
            color: white;
            padding: 0;
            border-radius: 50%; width: 70px; height: 70px; background-position: center; background-repeat: no-repeat; background-size: 35px;
            transition: background-color 0.2s; text-indent: -9999px; background-image: url("../img/file.svg");
        }
        
        .file-input-wrapper:hover {  }
        .file-input-wrapper input[type=file] {
            position: absolute;
            left: -9999px;
            opacity: 0;
        }
        
        /* Analysis Grid */
        .analysis-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
        }
        
        .color-swatch {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            display: inline-block;
            margin-right: 8px;
        }
        
        /* Preview Frame */
        /*#preview-frame {
            width: 100%;
            height: 60vh;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            background: white;
            overflow: hidden;
            position: relative;
        }*/
        
        /* Abstract Composition Styles */
        .abstract-composition {
            width: 100%;
            height: 100%;
            position: relative;
            overflow: hidden;
        }
        
        /* Music Controls */
        .music-controls {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            align-items: center;
        }
        
        .volume-control {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .volume-control input[type="range"] {
            width: 80px;
        }
        
        /* 編集モード用スタイル */
        .edit-mode {
            border: 3px dashed #6366f1;
            background-color: rgba(99, 102, 241, 0.05);
        }
        
        .edit-controls-overlay {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.65);
            border-radius: 12px;
            padding: 15px;
            backdrop-filter: blur(10px);
            z-index: 20;
            min-width: 250px;
        }
        
        .edit-controls-overlay .control-group {
            margin-bottom: 12px;
        }
        
        .edit-controls-overlay .control-group:last-child {
            margin-bottom: 0;
        }
        
        .edit-controls-overlay .control-label {
            font-size: 0.875rem;
            font-weight: 500;
            color: #000;
            margin-bottom: 6px;
            display: block;
}
#label {font-size: 1.2rem;}
        
        .edit-controls-overlay .button-group {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        
        .edit-controls-overlay .slider-container {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .edit-controls-overlay input[type="range"] {
            flex: 1;
            min-width: 80px;
        }
        
        .edit-controls-overlay .grid-display {
            background: none;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            color: #374151;
            min-width: 35px;
            text-align: center;
        }
        
        .edit-btn {
            padding: 8px 16px;
            border: none;
            border-radius: 6px;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        
        .edit-btn-save {
            background: #000;
            color: white;
        }
        
        .edit-btn-save:hover {
        }
        
        .edit-btn-cancel {
            background:none; border: 1px solid #000;
            color: #000;
        }
        
        .edit-btn-cancel:hover {
        }
        
        /* 編集ボタンオーバーレイ */
        .edit-button-overlay {
            position: absolute;
            top: 20px;
            left: 20px;
            border-radius: 8px;
            padding: 8px;
            /*backdrop-filter: blur(8px);*/
            z-index: 15; display: none;
        }
        
        .edit-button-overlay .edit-btn-main {
            background: rgba(0,0,0,.6);
            color: white;
            padding: 0;
            border: none;
            border-radius: 50%;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px; text-indent: -9999px; width: 44px; height: 44px; background-image: url("../img/edit.svg"); background-repeat: no-repeat; background-position: center; background-size: 20px;
        }
        
        .edit-button-overlay .edit-btn-main:hover {
            
        }
        
        .grid-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image: 
                linear-gradient(to right, rgba(0,0,0,0.1) 1px, transparent 1px),
                linear-gradient(to bottom, rgba(0,0,0,0.1) 1px, transparent 1px);
            pointer-events: none;
            z-index: 5;
        }
        
        .tempo-display {
            background: #1f2937;
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            font-family: monospace;
            font-weight: bold;
        }
        
        .music-info {
            background: #f3f4f6;
            padding: 1rem;
            border-radius: 0.5rem;
            margin-top: 1rem;
        }
        
        .music-info h4 {
            margin-bottom: 0.5rem;
            color: #374151;
        }
        
        .music-info p {
            margin: 0.25rem 0;
            font-size: 0.875rem;
        }
        
        .modulation-display {
            margin-top: 0.5rem;
            padding: 0.5rem;
            background-color: rgba(255, 107, 107, 0.1);
            border-radius: 0.25rem;
            font-weight: 600;
            font-size: 0.875rem;
            text-align: center;
            transition: all 0.3s ease;
        }
        
        .modulation-display.active {
            background-color: rgba(255, 107, 107, 0.2);
            animation: pulse 1s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.7; }
            100% { opacity: 1; }
        }
#back-to-initial-btn,#back-from-camera-btn { position: fixed; top:0; left: 0;}     

#capture-btn { background-color: rgba(254,0,4,1.00); border:2px solid #FFF; box-sizing: border-box;}
.btn:disabled { display: none;}

        h1 { color: #000; position: fixed; top:20px; left: 20px; font-size: 10vw; margin: 0; line-height: 1; transition: opacity 0.5s ease-out; opacity: 1;}
        
        /* h1のフェードアウト用クラス */
        h1.fade-out {
            opacity: 0;
            pointer-events: none;
        }
        
        /* h1のフェードイン用クラス */
        h1.fade-in {
            opacity: 1;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
           
            .container { padding: 0.5rem; }
            .text-3xl { font-size: 1.5rem; line-height: 2rem; }
            .analysis-grid { grid-template-columns: 1fr; }
            .music-controls { flex-direction: column; gap: 0.5rem; }
            #preview-frame { height: 50vh; }
        }
@media (orientation: landscape) {
h1 { font-size: 5vw;}
}

