body {
    font-family: Arial, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}
.container {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 0 auto;
    transition: max-width 0.3s ease;
}
.container.video-mode {
    max-width: 1800px;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.header-container h1 {
    margin: 0;
    font-size: clamp(1.5rem, 5vw, 2rem);
    flex: 1;
}
.support-button {
    display: flex;
    justify-content: flex-end;
}
.upload-boxes {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 20px 0;
    align-items: stretch;
}
.upload-box {
    flex: 1;
    max-width: 400px;
    padding: 20px;
    border-radius: 12px;
    background-color: white;
    border: 3px solid #2196f3;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}
.upload-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.upload-box.audio {
    border-color: #2196f3;
}
.upload-box.subtitle {
    border-color: #4caf50;
}
.upload-box input[type="file"] {
    display: none;
}
.upload-box label {
    display: block;
    cursor: pointer;
}
.upload-box .icon {
    font-size: 48px;
    margin-bottom: 10px;
}
.upload-box h3 {
    font-size: 18px;
    margin: 10px 0;
}
.upload-box p {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}
.player-section {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.player-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.player-container.video-mode {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    max-width: 100%;
}
.player-container.video-mode .media-section {
    flex: 1.2;
    min-width: 0;
}
.player-container.video-mode .subtitle-section {
    flex: 0.8;
    min-width: 0;
    height: 70vh;
    margin-top: 0;
}
#videoPlayer {
    width: 100%;
    max-height: 70vh;
    background-color: #000;
    border-radius: 8px;
}
#audioPlayer {
    width: 100%;
    height: 40px;
}
.subtitle-container {
    min-height: 500px;
    height: 60vh;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fafafa;
    resize: vertical;
}
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.controls-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.grouping-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}
.grouping-control input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}
.speed-control select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
}
button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background-color: #2196f3;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}
button.active {
    background-color: #1976d2;
}
button:hover {
    background-color: #1976d2;
    transform: translateY(-2px);
}
.info-message {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #1976d2;
}
.warning-message {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    color: #f57c00;
}
.close-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.6;
    font-size: 18px;
    background: none;
    border: none;
    padding: 5px;
}
.close-btn:hover {
    opacity: 1;
}
.start-button-container {
    display: flex;
    justify-content: center;
    margin: 30px 0 40px 0;
}
#startButton {
    font-size: 18px;
    padding: 15px 30px;
    background: linear-gradient(45deg, #2196f3, #1976d2);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    transform-origin: center;
}
#startButton:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}
#startButton:disabled {
    background: linear-gradient(45deg, #9e9e9e, #757575);
    box-shadow: none;
    transform: none;
}
.title-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    margin-right: 10px;
}
.button-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 8px;
}
.uploaded-files {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    background-color: #f8f9fa;
    display: none;
}
.uploaded-files.show {
    display: block;
}
.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.search-control {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    flex: 1;
    max-width: 300px;
}
.search-control input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.subtitle-item.highlight {
    background-color: #fff3cd;
    border-color: #ffeeba;
}
.subtitle-item.hidden {
    display: none;
}
.subtitle-item {
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: white;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.subtitle-item .text {
    flex: 1;
}
.subtitle-item .timestamp {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
}
.subtitle-item:hover {
    background-color: #f0f0f0;
    transform: translateX(5px);
}
.subtitle-item.active {
    background-color: #e3f2fd;
    border-color: #2196f3;
}
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 15px;
    }
    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .header-container h1 {
        flex: none;
    }
    .support-button {
        width: 100%;
        justify-content: center;
    }
    .upload-boxes {
        flex-direction: column;
        align-items: center;
    }
    .upload-box {
        width: 100%;
    }
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .controls-group {
        justify-content: center;
    }
    .grouping-control {
        flex: 1;
        justify-content: center;
    }
    .speed-control {
        flex: 1;
        justify-content: center;
    }
    .search-control {
        max-width: 100%;
        margin: 0 auto;
    }
    .subtitle-item {
        flex-direction: column;
    }
    .subtitle-item .timestamp {
        align-self: flex-start;
    }
}
@media (max-width: 900px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 15px;
    }
    .player-container.video-mode {
        flex-direction: column;
    }
    .player-container.video-mode .media-section,
    .player-container.video-mode .subtitle-section {
        width: 100%;
        flex: 1;
    }
    .player-container.video-mode .subtitle-section {
        height: 50vh;
    }
}

/* Soft, Integrated SimpleSub Promo Styles */
.simplesub-promo {
    margin-right: 10px;
    display: inline-block;
}

.simplesub-promo a {
    text-decoration: none;
    color: inherit;
}

.banner-content {
    background-color: #ffe3e3;
    border-radius: 10px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.06);
    height: 48px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.banner-content:hover {
    box-shadow: 0 4px 16px 0 rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.banner-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    /* No fill or stroke overrides, use original SVG colors */
}

.banner-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.banner-headline {
    font-family: Arial, Segoe UI, sans-serif;
    color: #c14444;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.1;
    margin-bottom: 2px;
    /* No outline or shadow */
}

.banner-subtitle {
    font-family: Arial, Segoe UI, sans-serif;
    color: #444;
    font-weight: 400;
    font-size: 12px;
    opacity: 0.85;
    line-height: 1;
}

@media (max-width: 768px) {
    .banner-content {
        min-width: 120px;
        padding: 8px 10px;
        height: 40px;
    }
    .banner-icon {
        width: 18px;
        height: 18px;
    }
    .banner-headline {
        font-size: 13px;
    }
    .banner-subtitle {
        font-size: 11px;
    }
}