/* Track File Merger 스타일 */
#tfm-output-format option {
    background: #252525;
}

.tfm-file-order-input {
    width: 60px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 12px;
    margin-right: 10px;
    text-align: center;
}

.tfm-merger-wrapper {
    background: #252525;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    max-width: 800px;
    margin: 40px auto;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
}

.tfm-merger-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 148, 148, 0.05) 0%, transparent 70%);
    animation: tfm-pulse 4s ease-in-out infinite;
}

@keyframes tfm-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.tfm-file-input-button span {
    vertical-align: middle;
    display: inline-block;
}

.tfm-merger-title {
    text-align: center;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin-top: 0px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #ff9494 0%, #ff7878 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tfm-merger-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.tfm-merger-wrapper label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tfm-file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: block;
    z-index: 1;
}

.tfm-file-input-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 148, 148, 0.1);
    color: #ff9494;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px dashed rgba(255, 148, 148, 0.3);
    position: relative;
    overflow: hidden;
}

.tfm-file-input-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 148, 148, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.tfm-file-input-button:hover::before {
    width: 300px;
    height: 300px;
}

.tfm-file-input-button:hover {
    background: rgba(255, 148, 148, 0.15);
    border-color: rgba(255, 148, 148, 0.5);
    box-shadow: 0 5px 20px rgba(255, 148, 148, 0.2);
}

.tfm-file-input-button svg {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    fill: currentColor;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.tfm-file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.tfm-files-list {
    margin: 0;
    position: relative;
    z-index: 1;
}

.tfm-file-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.tfm-file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 163, 255, 0.3);
}

.tfm-file-item.processing {
    border-color: rgba(255, 220, 100, 0.3);
    background: rgba(255, 220, 100, 0.05);
}

.tfm-file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: move;
}

.tfm-file-name {
    color: #ff9494;
    font-weight: 500;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tfm-file-size {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.tfm-file-order {
    background: rgba(148, 163, 255, 0.2);
    color: #ff9494;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
}

.tfm-remove-file {
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ff6464;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tfm-remove-file:hover {
    background: rgba(255, 100, 100, 0.3);
    transform: scale(1.05);
}

.tfm-merger-actions {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.tfm-output-format-wrapper {
    display: inline-flex;
    flex-direction: row !important;
    gap: 10px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.tfm-output-format-wrapper label {
    margin: 0;
    font-size: 13px;
}

.tfm-output-format-select {
    padding: 3px 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 7px;
}

.tfm-output-format-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 163, 255, 0.3);
}

.tfm-output-format-select:focus {
    outline: none;
    border-color: rgba(148, 163, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(148, 163, 255, 0.1);
}

.tfm-merger-wrapper input[type="submit"] {
    padding: 10px 15px;
    background: linear-gradient(135deg, #ff9494 0%, #7888ff 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.tfm-merger-wrapper input[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.tfm-merger-wrapper input[type="submit"]:hover::before {
    left: 100%;
}

.tfm-merger-wrapper input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(148, 163, 255, 0.3);
}

.tfm-merger-wrapper input[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tfm-merger-wrapper input[type="submit"]:disabled:hover {
    transform: none;
    box-shadow: none;
}

.tfm-merger-result {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.tfm-merger-result.tfm-success {
    border-color: rgba(148, 163, 255, 0.2);
    background: linear-gradient(135deg, rgba(148, 163, 255, 0.03) 0%, rgba(148, 163, 255, 0.06) 100%);
}

.tfm-merger-result.tfm-success > p:first-child {
    color: #ff9494;
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(148, 163, 255, 0.1);
}

.tfm-merger-result a {
    color: #ff9494;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(148, 163, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.tfm-merger-result a:hover {
    background: rgba(148, 163, 255, 0.2);
    transform: translateX(2px);
}

.tfm-track-info {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.tfm-track-info-item {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
}

.tfm-track-info-label {
    color: rgba(255, 255, 255, 0.5);
}

.tfm-track-info-value {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* 드래그 핸들 아이콘 */
.tfm-drag-handle {
    font-size: 16px;
    color: #ff9494;
    cursor: move;
    opacity: 0.8;
    transition: transform .2s;
    margin-right: 6px;
}

.tfm-file-item:hover .tfm-drag-handle {
    transform: scale(1.15);
}

/* Sortable 드래그 중 스타일 */
.tfm-file-item.dragging {
    opacity: 0.5;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
    .tfm-merger-wrapper {
        padding: 20px;
        margin: 20px;
    }
    
    .tfm-merger-title {
        font-size: 22px;
    }
    
    .tfm-file-size {
        display: none;
    }
    
    .tfm-merger-actions {
        flex-direction: column;
    }
    
    .tfm-output-format-wrapper {
        flex-wrap: wrap;
    }
}