/*
Theme Name: Photo Theme
Theme URI: https://example.com
Author: You
Description: ストップ再生機能付き・スマホ操作改善
Version: 3.1
*/

/* リセット */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #222520;
}

/* ロゴ設定 */
#site-logo {
    position: fixed;
    z-index: 9999;
    line-height: 1;
    cursor: auto;
    opacity: 0;
    transition: opacity 1s ease;
}
#site-logo.visible {
    opacity: 1;
}
#site-logo img {
    display: block;
}

/* スライドショーエリア */
#slideshow-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #222520;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1.5s ease-in-out;
    will-change: opacity, transform;
    z-index: 0;
}

.slide-item.active {
    opacity: 1;
    z-index: 1;
    animation: zoomEffect 7s linear forwards;
}

@keyframes zoomEffect {
    0% { transform: scale(1.1); }
    100% { transform: scale(1.0); }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    pointer-events: none;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease;
}
#particles-js.visible {
    opacity: 1;
}

#progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.05);
    z-index: 10;
    opacity: 0;
    transition: opacity 1s ease;
}
#progress-container.visible {
    opacity: 1;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, rgba(255,255,255,0) 20%, rgba(255,255,255,0.7) 100%);
    box-shadow: 1px 0 3px rgba(255,255,255,0.5);
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #222520;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out;
}

#loading-circle {
    width: 10px;
    height: 10px;
    background-color: #ff0000;
    border-radius: 50%;
    animation: pulseRed 0.8s infinite ease-in-out alternate;
}

@keyframes pulseRed {
    0% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 1; }
}

/* --- コントロールパネル --- */
#control-panel {
    position: fixed;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 40px; 
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

#control-panel.visible {
    opacity: 1;
    pointer-events: auto;
}

/* 押しやすくするための修正 */
.control-btn {
    cursor: pointer;
    /* ボタン全体のサイズを大きく（透明な余白を作る） */
    width: 44px; 
    height: 44px;
    /* アイコンを中央に配置 */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

/* アイコン画像自体のサイズは小さく固定 */
.control-btn img {
    width: 14px; 
    height: auto;
    display: block;
}

.control-btn:hover {
    opacity: 0.7;
}

@media screen and (max-width: 768px) {
    #site-logo {
        left: 50% !important;
        transform: translateX(-50%);
        top: 30px !important; 
        width: 100%;
        text-align: center;
        pointer-events: none;
    }
    #site-logo a {
        display: inline-block;
        pointer-events: auto;
    }
    #site-logo img {
        transform: scale(0.5); 
        transform-origin: top center;
    }
    #control-panel {
        left: 20px;
    }
}