* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
}

h1 {
    color: white;
    margin-bottom: 20px;
}

#title {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10vw;
    color: white;
    z-index: 1000;
    margin: 0;
    pointer-events: none;
}

#title.hidden {
    display: none;
}

.container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 1200px;
    width: 100%;
}

.video-container {
    position: fixed; width: 100%; top:50%; left: 0; transform: translateY(-50%);
    border-radius: 0px;
    overflow: hidden;
    background: #000;
}

#video {
    width: 100%;
    display: block;
}

.canvas-container {
    display: flex;
    margin-bottom: 0px;
    flex-wrap: wrap; width: 100%; top:50%; left: 0; transform: translateY(-50%); position: fixed;
}

.canvas-wrapper {
    flex: 1;
    min-width: 300px;
}

.canvas-wrapper h3 {
    margin-bottom: 10px;
    color: #333;
}

canvas {
    border: 0px solid #ddd;
    border-radius: 0px;
    width: 100%;
    display: block;
    background: #f0f0f0;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0px; position: fixed; bottom: 0; left: 0; width: 100%;
    padding: 40px 0;
    z-index: 2;
}

.music-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0px;
    padding: 40px 0;
    position: fixed; bottom: 0; left: 0; width: 100%;
    z-index: 2;
}

button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#captureBtn {
    background: #FFF;
    color: transparent;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 10px solid #000;
    padding: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#playBtn {
    background: transparent;
    color: #000000;
    box-shadow: none;
    padding: 8px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#stopBtn {
    background: transparent;
    color: #000000;
    box-shadow: none;
    padding: 8px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#resetBtn {
    background: transparent;
    color: #000000;
    box-shadow: none;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

#downloadBtn {
    background: transparent;
    color: #000000;
    box-shadow: none;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

#downloadBtn:hover {
    transform: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.05);
}

#downloadBtn .material-symbols-outlined {
    font-size: 24px;
}

#downloadBtn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#playBtn:hover,
#stopBtn:hover,
#resetBtn:hover {
    transform: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.05);
}

#playBtn .material-symbols-outlined,
#stopBtn .material-symbols-outlined {
    font-size: 60px;
}

#resetBtn .material-symbols-outlined {
    font-size: 24px;
}

button:hover:not(#playBtn):not(#stopBtn):not(#resetBtn):not(#captureBtn) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

#captureBtn:hover {
    transform: none;
    box-shadow: none;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.status {
    padding: 0;
    border-radius: 0px;
    text-align: center;
    font-weight: bold; position: fixed; top:0; left: 0; width: 100%; box-sizing: border-box; color: #333;
    height: 60px;
    line-height: 60px;
    background: rgba(255, 255, 255, .5) !important;
    z-index: 2;
    transition: background 0.3s ease;
}

.status:empty {
    background: rgba(255, 255, 255, 0) !important;
}

.status.processing {
    background: transparent;
    color: #333;
}

.status.complete {
    background: transparent;
    color: #333;
}

.status.playing {
    background: transparent;
    color: #333;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.params {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px; display: none;
}

.params label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.params input {
    width: 100%;
    margin-bottom: 15px;
}

.color-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.color-group {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.music-info {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #e7f3ff 0%, #f0e7ff 100%);
    border-radius: 8px;
    display: none;
    border: 2px solid #9370db; display: none;
}

.music-info.show {
    display: block;
}

.music-info h4 {
    margin-bottom: 10px;
    color: #4a148c;
    font-size: 18px;
}

.music-info p {
    margin: 5px 0;
    color: #333;
    font-size: 14px;
}

.music-info .section {
    margin-top: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
}

/* ランドスケープ（横向き）モードでのスタイル */
@media (orientation: landscape) {
    .video-container {
        height: 100svh;
    }

    #video {
        width: 100%;
        height: 100svh;
        object-fit: contain;
    }

    .canvas-container {
        height: 100svh;
    }

    canvas {
        width: 100%;
        height: 100svh;
        object-fit: contain;
    }

    button {
        border-radius: 50%;
        background: rgba(255, 255, 255, .7) !important;
    }

    .status {
        background: rgba(255, 255, 255, .5) !important;
    }

    .status:empty {
        background: rgba(255, 255, 255, 0) !important;
    }
}
