body { font-family: sans-serif; background: #111; color: #eee; margin: 20px; }
#top { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
#transcripts { white-space: pre-wrap; background: #000; padding: 10px; height: 400px; overflow-y: auto; border: 1px solid #444; margin-top: 10px; }

/* Control Panel Styling */
.btn { padding: 8px 16px; font-weight: bold; cursor: pointer; border: none; border-radius: 4px; color: #fff; background: #444; }
#startBtn { background: #28a745; }
#startBtn:disabled { background: #1e5c2c; color: #aaa; cursor: not-allowed; }
#stopBtn { background: #dc3545; }
#stopBtn:disabled { background: #6c232a; color: #aaa; cursor: not-allowed; }
#muteBtn { background: #28a745; }

.status-item { font-size: 1rem; background: #222; padding: 8px 12px; border-radius: 4px; border: 1px solid #333; }
.timer-active { color: #28a745; font-weight: bold; }

/* Instruction Text Near Button */
.button-hint { font-size: 0.95rem; color: #aaa; font-style: italic; }

/* Caption Title Area */
.caption-header-box { margin-top: 30px; }
.caption-title { font-size: 1.3rem; margin: 0 0 5px 0; color: #fff; }
.caption-subtitle { font-size: 0.95rem; color: #aaa; margin-bottom: 20px; }

/* --- Mobile Instructions Styles --- */
.stream-container { max-width: 600px; margin: 40px 0 20px 0; color: #eee; }
.stream-title { font-size: 1.5rem; margin-bottom: 5px; color: #fff; }
.stream-subtitle { font-size: 0.95rem; color: #aaa; margin-bottom: 20px; }

/* Dropdown/Accordion Styling */
details { background: #1a1a1a; border: 1px solid #333; border-radius: 8px; margin-bottom: 12px; overflow: hidden; transition: all 0.3s ease; }
details[open] { border-color: #28a745; background: #222; }
summary { padding: 16px; font-size: 1.05rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
summary::after { content: "▼"; font-size: 0.8rem; color: #888; transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(180deg); color: #28a745; }
summary::-webkit-details-marker { display: none; }
.dropdown-content { padding: 0 20px 20px 20px; border-top: 1px solid #333; }
ol { margin: 15px 0 0 0; padding-left: 20px; }
li { margin-bottom: 12px; line-height: 1.5; color: #ddd; }
.store-badge { display: block; margin: 8px 0; }

/* URL box and Copy Button Styling */
.url-box-container { display: flex; align-items: center; margin: 10px 0; background: #111; border-radius: 6px; padding: 8px 12px; border: 1px solid #444; }
.url-text { font-family: monospace; font-size: 0.95rem; color: #ff9f1c !important; word-break: break-all; flex-grow: 1; }
.copy-btn { background: #007bff; color: white; border: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.85rem; font-weight: bold; margin-left: 10px; white-space: nowrap; transition: background 0.2s; }
.copy-btn:hover { background: #0056b3; }
.copy-btn.copied { background: #28a745; }

/* Global Link Styles for Dark Backgrounds */
a, 
a:visited,
.nav-domain-link,
.pc-download-link {
    color: #00d2ff !important;
    text-decoration: none !important;
    font-weight: bold;
    transition: color 0.15s ease-in-out;
}

a:hover, 
a:active,
.nav-domain-link:hover,
.pc-download-link:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* INTERACTIVE INTERFACE CONTROLS & SPECIFICATIONS */
.timestamp-container {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    cursor: pointer;
    user-select: none;
}

.play-indicator-icon {
    display: inline-block;
    font-size: 0.75rem;
    margin-left: 6px;
    color: #00d2ff;
    transition: color 0.15s ease-in-out, transform 0.1s ease;
}

.timestamp-container:hover .play-indicator-icon {
    color: #ffffff;
    transform: scale(1.15);
}

.timestamp-container:hover .timestamp-link {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.transcript-row.is-playing-archive .play-indicator-icon {
    color: #ff9f1c !important; 
    transform: scale(1.0) !important;
}

.transcript-row.is-playing-archive .timestamp-link {
    color: #ff9f1c !important; 
    font-weight: bold;
    text-decoration: none !important;
}

.transcript-row.is-playing-archive {
    background-color: rgba(255, 159, 28, 0.04);
    border-left: 3px solid #ff9f1c;
    padding-left: 5px;
}

.transcript-row {
    display: block;
    margin-bottom: 4px;
    line-height: 1.4;
    white-space: normal;
}
/* --- RECORDED ARCHIVE HISTORY COLORS (NEW) --- */
/* Unvisited links use your preferred light-blue layout color */
.transcript-row .timestamp-link {
    color: #00d2ff !important;
}

/* FIX: Visited/Played links change to a distinct purple color layout */
.transcript-row.has-been-played-by-user .timestamp-link {
    color: #bb86fc !important; 
}

/* Maintain gold override colors during active audio streaming frames */
.transcript-row.is-playing-archive .timestamp-link {
    color: #ff9f1c !important;
}

/* --- ACTIVE RECORDING STATE LIVE-LOCKS --- */
.row-locked-recording {
    background-color: rgba(220, 53, 69, 0.04) !important;
    border-left: 3px solid #dc3545 !important;
    padding-left: 5px;
    cursor: not-allowed !important;
}

.timestamp-container-locked {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    user-select: none;
}

.timestamp-link-locked {
    color: #ff3b30 !important;
    font-family: monospace;
    font-weight: normal;
}

.recording-pulse-dot {
    font-size: 0.65rem;
    margin-left: 6px;
    animation: pulseVisibility 1s infinite alternate;
}

@keyframes pulseVisibility {
    0% { opacity: 0.2; }
    100% { opacity: 1.0; }
}

@keyframes pulseVisibility {
    0% { opacity: 0.2; }
    100% { opacity: 1.0; }
}
