.upload_label {
    /*width: 200px !important;*/
    /*top: 510px !important;
    left:60px !important;*/
}
.upload_input {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    height: calc(1.5em + 0.75rem + 2px) !important;
    margin: 0 !important;
    opacity: 0 !important;
}
.box {
    width:80%;
}
.fa-xmark:hover {
    color:red;
}

 .gg-close-o {
 cursor:pointer;	 
 margin-left:10px;
 box-sizing: border-box;
 position: relative;
 display: inline-block;
 transform: scale(var(--ggs,1));
 width: 22px;
 height: 22px;
 border: 2px solid;
 border-radius: 40px
}

.gg-close-o::after,
.gg-close-o::before {
 content: "";
 display: block;
 box-sizing: border-box;
 position: absolute;
 width: 12px;
 height: 2px;
 background: currentColor;
 transform: rotate(45deg);
 border-radius: 5px;
 top: 8px;
 left: 3px
}

.gg-close-o::after {
 transform: rotate(-45deg)
}

.gg-close-o:hover {
 color:red;
}

.gg-close-o:hover .tooltip-text {
  visibility: visible;
}

.tooltip-text {
  visibility: hidden;
  position: absolute;
  z-index: 1;
  width: 300px;
  color: white;
  font-size: 12px;
  background-color: #192733;
  border-radius: 10px;
  padding: 10px 15px 10px 15px;
}
#top {
  top:-45px;
  left:-50%;
}
.ffile {
     position:relative;
}
.left-box{
    width: 15%;
    flex-grow: 1;
    text-align: center;
    /*background-color:#bbbaba;*/
}
.right-box{
    width: 100%;
    flex-grow: 1;
}
.paragraph_options {
    	height:63%;
	overflow-y: auto;
	width:100%;
	/*display: inline-block;*/
}
.paragraph_options input[type="radio"] {
    display: none;
}
      
.paragraph_options label {
        display: block;
        width: 100%;
        padding: 10px;
	border-bottom: 1px solid #ccc;
        text-align: center;
        cursor: pointer;
	margin-bottom: 0;
	background-color:#f7f9fa;
}
.paragraph_options label:first-child {
        border-top: 1px solid #ccc;
}
      
.paragraph_options label:hover {
        background-color: #f0f0f0;
}
      
.paragraph_options input[type="radio"]:checked + label {
        background-color: #f0f0f0;
}
      
.paragraph_options input[type="radio"]:checked + label:before {
        content: "\2713";
        display: block;
        margin: 0 auto;
        font-size: 20px;
        color: green;
}

 .gg-add {
 box-sizing: border-box;
 position: relative;
 display: block;
 width: 22px;
 height: 22px;
 border: 2px solid;
 transform: scale(var(--ggs,1));
 border-radius: 22px
}

.gg-add::after,
.gg-add::before {
 content: "";
 display: block;
 box-sizing: border-box;
 position: absolute;
 width: 10px;
 height: 2px;
 background: currentColor;
 border-radius: 5px;
 top: 8px;
 left: 4px
}

.gg-add::after {
 width: 2px;
 height: 10px;
 top: 4px;
 left: 8px
}

/*新播放樣式表*/
.out_video_control {
    display: flex;
    flex-direction: column;
    width:75%;
    border:1px solid #bbbaba;
    position:relative;
    overflow: hidden;
}
.left-up-div {
    padding:10px 10px 10px 10px;
}
.left-up-div img {
    width:100%;
}
.paragraph_title {
     border-top:1px solid;
    /*padding-bottom:10px;*/
    padding-top :10px;
    display: grid;
    grid-template-columns: 1fr 23px;
    /*display: flex;
    justify-content: center;
    align-items: center;*/
    height:7%;
}

 .gg-close-o-view {
 box-sizing: border-box;
 position: relative;
 transform: scale(var(--ggs,1));
 width: 22px;
 height: 22px;
 cursor:pointer;
}

.gg-close-o-view::after,
.gg-close-o-view::before {
 content: "";
 display: block;
 box-sizing: border-box;
 position: absolute;
 width: 12px;
 height: 2px;
 background: currentColor;
 transform: rotate(45deg);
 border-radius: 5px;
 top: 8px;
 left: 3px
}

.gg-close-o-view::after {
 transform: rotate(-45deg)
}

.close-paragraph {
	background-color: #1c1d1f;
	border: 1px solid #6a6f73;
        height: 35px;
        position: absolute;
        left: 0px;
	top: calc(3.45rem);
	height: 3rem;
	transform: translateX(-75%);
	display:flex;
	align-items: center;
	/*transition: width 0.5s ease;*/
	transition: transform 400ms cubic-bezier(.2,0,.38,.9);
	display:none;
	z-index:999;
}

.close-paragraph:hover {
	background-color: #393b3f;
    transform: translateX(0%);
}

.close-paragraph span {
	margin-left: 0.4rem;
     color:white;
     font-size:18px;
     flex: 0 0 auto;
     /*opacity:0;*/
}

.close-paragraph img {
    flex: 0 0 auto;
    height:100%;
}

.control-body {
    display: flex;
    flex-direction: row;
}
.control-header {
    background-color:#ededed;
}
.control-header img {
	padding: 10px 0 10px 10px;
	height:55px;
}


/*icon css範圍*/
 .gg-arrow-right {
 box-sizing: border-box;
 position: relative;
 display: block;
 transform: scale(var(--ggs,1));
 width: 22px;
 height: 22px;
 color:white;
}

.gg-arrow-right::after,
.gg-arrow-right::before {
 content: "";
 display: block;
 box-sizing: border-box;
 position: absolute;
 right: 3px;
}

.gg-arrow-right::after {
 width: 8px;
 height: 8px;
 border-top: 2px solid;
 border-right: 2px solid;
 transform: rotate(45deg);
 bottom: 7px;
}

.gg-arrow-right::before {
 width: 16px;
 height: 2px;
 bottom: 10px;
 background: currentColor;
}
.modal-body {
        border-radius: 0px;
    border-top: 4px solid #ed5107;
    overflow: hidden;
    background-color: #efefef;
    padding-left: 0px;
    padding-right: 0px;
    -webkit-box-shadow: 0 10px 50px -10px rgba(0, 0, 0, 0.9);
    box-shadow: 0 10px 50px -10px rgba(0, 0, 0, 0.9);
}
.save_btn {
    color: #fff !important;
    background-color: #ed5107 !important;
    border: 1px solid !important;
}
.cancel_btn {
    color: #fff !important;
    background-color: gray !important;
    border: 1px solid !important;
}
.paragraph_time {
    width:20%;
}

.survey_arar_vansih {
    opacity: 0; 
    /*transform: translateX(100%);*/ 
    transition: opacity 0.5s ease, transform 0.75s ease, display 1s ease; 
}
.survey_arar_appear {
    opacity: 1; 
    /*transform: translateX(0%); */
    transition: opacity 0.5s ease, transform 0.75s ease; 
}
.year_area {
    text-align: end;
    width: 75%;
    display:flex;
    justify-content: end;
    background-color:#f1f9ff;
    border-radius: 5px;
    height:55px;
    margin-top: 30px;
    align-items: center;
}
.year_label {
    font-size: 1.15rem;
    color:#0054b7;
    margin-bottom: 0 !important;
}
.select {
    margin-right: 1.5em;
}
#year {
    padding:5px;
    border-radius:5px;
}
 .gg-arrow-right-o {
 box-sizing: border-box;
 position: relative;
 display: inherit;
 width: 22px;
 height: 22px;
 border: 2px solid;
 transform: scale(var(--ggs,1));
 border-radius: 20px;
 top: 4px;
 right: 5px;
 background-color: #0054b7;
}

.gg-arrow-right-o::after,
.gg-arrow-right-o::before {
 content: "";
 display: block;
 box-sizing: border-box;
 position: absolute;
 right: 5px;
}

.gg-arrow-right-o::after {
 width: 10px;
 height: 10px;
 border-top: 3px solid;
 border-right: 3px solid;
 transform: rotate(45deg);
 bottom: 4px;
 color: white;
}
.custom_notify {
    width: 70%;
    color: #691911;
    background-color: #f4d6d2;
    border-color: #f0c5c1;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
}

 .gg-close {
 box-sizing: border-box;
 position: relative;
 display: block;
 transform: scale(var(--ggs,1));
 width: 22px;
 height: 22px;
 border: 2px solid transparent;
 border-radius: 40px;
 cursor:pointer;
}

.gg-close::after,
.gg-close::before {
 content: "";
 display: block;
 box-sizing: border-box;
 position: absolute;
 width: 16px;
 height: 2px;
 background: currentColor;
 transform: rotate(45deg);
 border-radius: 5px;
 top: 8px;
 left: 1px
}

.gg-close::after {
 transform: rotate(-45deg)
}

 .gg-add-r {
 box-sizing: border-box;
 position: relative;
 display: block;
 width: 22px;
 height: 22px;
 border: 2px solid;
 transform: scale(var(--ggs,1));
 border-radius: 4px
}

.gg-add-r::after,
.gg-add-r::before {
 content: "";
 display: block;
 box-sizing: border-box;
 position: absolute;
 width: 10px;
 height: 2px;
 background: currentColor;
 border-radius: 5px;
 top: 8px;
 left: 4px
}

.gg-add-r::after {
 width: 2px;
 height: 10px;
 top: 4px;
 left: 8px
}

/* ===== AI 語音字幕分析區塊 ===== */

@keyframes aiPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.25; transform: scale(1.5); }
}

#ai_subtitle_section {
    margin-top: 8px;
}

.ai-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #0d0d1a 0%, #12122b 50%, #0a1628 100%);
    border: 1px solid rgba(102, 126, 234, 0.35);
    border-radius: 12px;
    padding: 11px 18px;
    box-shadow: 0 4px 22px rgba(102, 126, 234, 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ai-icon-box {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.25));
    border: 1px solid rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ai-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ai-card-label {
    font-size: 10px;
    color: #ffffff;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.ai-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ai-dot.pulse {
    animation: aiPulse 1.5s ease-in-out infinite;
}

.ai-dot.pulse-fast {
    animation: aiPulse 0.85s ease-in-out infinite;
}

.ai-status-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}

.ai-action-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.ai-btn {
    border: none;
    border-radius: 20px;
    padding: 4px 13px;
    font-size: 11.5px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: opacity .2s, transform .1s;
    line-height: 1.6;
}

.ai-btn:hover {
    opacity: 0.82;
    transform: translateY(-1px);
}

.ai-btn:active {
    transform: translateY(0);
}

.ai-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.ai-btn-send {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.ai-btn-reanalyze {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    color: #cbd5e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-btn-download {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: #fff;
    text-decoration: none;
    display: inline-block;
}

.ai-btn-download:hover {
    color: #fff;
    text-decoration: none;
}

.ai-err-msg {
    font-size: 11.5px;
    color: #fc8181;
    display: none;
}

/* ===== 字幕搜尋側邊欄 ===== */

/* ── 外層 wrapper：限制最大寬度讓影片在 13 吋螢幕不過大 ── */
.streamming-layout-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;   /* 高度由 JS ResizeObserver 同步，不用 stretch */
    gap: 12px;
    max-width: 1260px;          /* 13 吋桌電適用上限 */
    width: 100%;
}

/* out_video_control 在 wrapper 內自動填滿剩餘寬度 */
.streamming-layout-wrapper .out_video_control {
    width: auto;
    flex: 1;
    min-width: 0;
}

/* ── 搜尋面板：始終佔位（影片寬度永遠不變），CC 決定展開或收合 ── */
.subtitle-search-panel {
    display: flex;
    flex-direction: column;
    width: 260px;
    flex-shrink: 0;
    border: 1px solid #bbbaba;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

/* ── 收合狀態（CC 關 / 預設）：只顯示 header，body 隱藏 ── */
.subtitle-search-panel.ssp-collapsed .ssp-body {
    display: none;
}

/* 收合時 header 樣式不變，title/count 依然可見 */
.subtitle-search-panel.ssp-collapsed .ssp-toggle::after {
    content: '\25BC';          /* ▼ 點擊展開 */
}

/* ── 展開狀態（CC 開）：body 帶淡入動畫出現 ── */
.subtitle-search-panel:not(.ssp-collapsed) .ssp-body {
    animation: ssp-body-in 0.25s ease;
}
@keyframes ssp-body-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.ssp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #1c1d1f;
    color: #fff;
    flex-shrink: 0;
    gap: 6px;
}
.ssp-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex: 1;
}
.ssp-count {
    font-size: 11px;
    background: rgba(255,255,255,0.15);
    padding: 2px 7px;
    border-radius: 10px;
    color: #ccc;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── 收合按鈕 ── */
.ssp-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    padding: 2px 0;
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.ssp-toggle:hover { color: #fff; }
.ssp-toggle::after {
    content: '\25B2';          /* ▲ 點擊收合 */
}

/* ── Body：撐滿剩餘高度，讓 results 可以 scroll ── */
.ssp-body {
    padding: 10px 12px;
    flex: 1;
    min-height: 0;             /* 重要：讓 flex 子層可以縮小 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ssp-lang-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.ssp-lang-btn {
    padding: 3px 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
    color: #555;
    transition: all 0.15s;
}
.ssp-lang-btn.active {
    background: #1c1d1f;
    border-color: #1c1d1f;
    color: #fff;
}
.ssp-search-row {
    margin-bottom: 6px;
    flex-shrink: 0;
}
.ssp-input {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.ssp-input:focus { border-color: #1c1d1f; }

.ssp-results-header {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    padding: 0 2px;
    flex-shrink: 0;
}

/* ── 結果清單：高度填滿剩餘空間，超出 scroll ── */
.ssp-results {
    flex: 1;
    min-height: 0;             /* 允許縮小至 0，由 scroll 接手 */
    overflow-y: auto;
    overflow-x: hidden;
}
.ssp-item {
    display: flex;
    gap: 8px;
    padding: 8px 6px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s;
    align-items: flex-start;
    border-bottom: 1px solid #f5f5f5;
}
.ssp-item:hover { background: #f0f4ff; }
.ssp-item.ssp-active {
    background: #e3edff;
    border-left: 3px solid #0054b7;
    padding-left: 4px;
}
.ssp-ts {
    font-size: 11px;
    font-weight: 600;
    color: #0054b7;
    font-family: monospace;
    background: #e8f0fe;
    padding: 2px 5px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}
.ssp-text {
    font-size: 13px;
    color: #333;
    line-height: 1.45;
    word-break: break-all;
}
.ssp-text mark {
    background: #ffe066;
    color: #1a1a1a;
    border-radius: 2px;
    padding: 0 1px;
}
.ssp-empty {
    text-align: center;
    padding: 30px 10px;
    color: #999;
    font-size: 13px;
}

/* ===== 手機版（≤ 767px）字幕搜尋面板 ===== */
@media (max-width: 767px) {

    /* 整個 wrapper 改直向排列 */
    .streamming-layout-wrapper {
        flex-direction: column;
        max-width: 100%;
        gap: 0;
    }

    /* 影片區全寬 */
    .streamming-layout-wrapper .out_video_control {
        width: 100%;
    }

    /* 搜尋面板：全寬、緊貼影片下方、無左右 transition */
    .subtitle-search-panel {
        width: 100% !important;   /* 蓋掉桌機的 260px 及收合的 38px */
        transition: none;
        border-radius: 0 0 6px 6px;
        border-top: none;
    }

    /* 手機收合：保持全寬，只隱藏 body，標題仍可見讓用戶知道功能在這 */
    .subtitle-search-panel.ssp-collapsed {
        width: 100% !important;
    }

    /* 手機收合：只隱藏 body，title 和 count 保留 */
    .subtitle-search-panel.ssp-collapsed .ssp-title {
        display: inline !important;
    }
    .subtitle-search-panel.ssp-collapsed .ssp-count {
        display: inline-block !important;
    }
    .subtitle-search-panel.ssp-collapsed .ssp-header {
        justify-content: space-between;
        padding: 9px 14px;
    }

    /* 手機版 toggle 箭頭改上下方向 */
    .ssp-toggle::after {
        content: '\25B2';   /* ▲ 展開狀態 → 點了收合 */
    }
    .subtitle-search-panel.ssp-collapsed .ssp-toggle::after {
        content: '\25BC';   /* ▼ 收合狀態 → 點了展開 */
    }

    /* 手機版 header 稍微緊湊 */
    .ssp-header {
        padding: 9px 14px;
        cursor: pointer;    /* header 整列可點，提示可展開 */
    }

    /* body：手風琴展開，不撐高 */
    .ssp-body {
        overflow: visible;
        flex: none;
    }

    /* 結果區：固定最大高度 + scroll */
    .ssp-results {
        flex: none;
        max-height: 260px;
        min-height: 60px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 觸控區放大 */
    .ssp-item {
        padding: 10px 8px;
    }
    .ssp-ts {
        font-size: 12px;
        padding: 3px 6px;
    }
    .ssp-text {
        font-size: 14px;
    }
}
