/* gif-player-plugin.css */

.spage1imgbox {
    position: relative;
    width: 100%;
    aspect-ratio: 825/700;
    background: #f5f5f5;
    overflow: hidden;
    border: 1px solid #ddd;
}

.spage1imgboxin3 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 16%;
    overflow: hidden;
    z-index: 4;
}

.spage1imgboxin4 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 14%;
    overflow: hidden;
    z-index: 4;
}

.spage1imgboxin2 {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
}

.spage1imgboxin2b {
    position: absolute;
    top: 16%;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 70%;
    overflow: hidden;
}

#spbox {
    position: absolute;
    z-index: 0;
    top: 16%;
    left: 0;
    width: 100%;
    height: 70%;
    transform-origin: center center;
}

/* ===== 靜態文字顯示在 GIF 上方 ===== */
.spage1imgboxin3 p,
.spage1imgboxin4 p,
.spage1imgboxin2b p {
    position: relative;
    z-index: 10 !important;
    pointer-events: none;
}

/* ===== GIF Canvas ===== */
.gif-display-canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: transparent;
}

/* ===== 隱藏背景 ===== */
#gif-canvas-4 {
    display: none !important;
}

/* ===== 顯示上、中、下框 ===== */
#gif-canvas-1,
#gif-canvas-2,
#gif-canvas-3 {
    display: block !important;
}

/* ===== 控制按鈕 ===== */
.gif-player-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
}

.gif-player-controls button {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    min-width: 38px;
    min-height: 34px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.gif-player-controls button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gif-btn-play { background: #4CAF50; }
.gif-btn-play:hover { background: #45a049; }
.gif-btn-play.paused { background: #FF9800; }

.gif-btn-prev,
.gif-btn-next { background: #2196F3; }
.gif-btn-prev:hover,
.gif-btn-next:hover { background: #1976D2; }

.gif-btn-reset { background: #9E9E9E; }
.gif-btn-reset:hover { background: #757575; }

.info {
    margin-top: 8px;
    color: #555;
    font-size: 14px;
}