/* Track Converter 스타일 */
.converter-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;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 80px rgba(255, 148, 148, 0.1);
    position: relative;
    overflow: hidden;
}

.converter-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: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.converter-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;
}

.converter-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.converter-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;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: block;
    z-index: 1;
}

.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;
}

.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;
}

.file-input-button:hover::before {
    width: 300px;
    height: 300px;
}

.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);
}

.file-input-button svg {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    fill: currentColor;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.file-input-button span {
    vertical-align: middle;
    display: inline-block;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.files-list {
    margin: 0;
    position: relative;
    z-index: 1;
}

.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;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 148, 148, 0.3);
}

.file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-name {
    color: #ff9494;
    font-weight: 500;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.file-size {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.file-format-select {
    width: 150px;
    padding: 8px 5px;
    max-width: 80px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-format-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 148, 148, 0.3);
}

.file-format-select:focus {
    outline: none;
    border-color: rgba(255, 148, 148, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 148, 148, 0.1);
}

.file-format-select option {
    background: #1a1a2e;
    color: #fff;
}

.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;
    margin-left: 10px;
}

.remove-file:hover {
    background: rgba(255, 100, 100, 0.3);
    transform: scale(1.05);
}

.converter-actions {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.converter-wrapper input[type="submit"] {
    padding: 10px 30px;
    background: linear-gradient(135deg, #ff9494 0%, #ff7878 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;
}

.converter-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;
}

.converter-wrapper input[type="submit"]:hover::before {
    left: 100%;
}

.converter-wrapper input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 148, 148, 0.3);
}

.converter-wrapper input[type="submit"]:active {
    transform: translateY(0);
}

.converter-wrapper input[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.converter-wrapper input[type="submit"]:disabled:hover {
    transform: none;
    box-shadow: none;
}

.converter-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;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

/* 변환 완료 박스 디자인 개선 */
.converter-result.success {
    border-color: rgba(255, 148, 148, 0.2);
    background: linear-gradient(135deg, rgba(255, 148, 148, 0.03) 0%, rgba(255, 148, 148, 0.06) 100%);
    padding: 16px 20px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.converter-result.success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff9494, transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.converter-result.success > p:first-child {
    color: #ff9494;
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 12px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 148, 148, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.converter-result.success p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    padding: 8px 0;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.converter-result.success p:hover {
    color: rgba(255, 255, 255, 0.95);
    padding-left: 8px;
}

.converter-result.error {
    border-color: rgba(255, 144, 144, 0.3);
    background: rgba(255, 144, 144, 0.05);
}

.converter-result p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.converter-result a {
    color: #ff9494;
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
    padding: 8px 16px;
    background: rgba(255, 148, 148, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.converter-result a:hover {
    background: rgba(255, 148, 148, 0.2);
    transform: translateX(2px);
}

.download-all {
    background: linear-gradient(135deg, #94a3ff 0%, #7888ff 100%);
    padding: 12px 24px;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.download-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(148, 163, 255, 0.3);
}

.file-count {
    background: rgba(255, 148, 148, 0.2);
    color: #ff9494;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    position: absolute;
    top: -10px;
    right: -10px;
    display: none !important;
}

/* 성공 아이콘 스타일 */
.converter-result.success p:not(:first-child)::before {
    content: '✓';
    color: #ff9494;
    font-weight: 700;
    font-size: 12px;
    width: 20px;
    height: 20px;
    background: rgba(255, 148, 148, 0.1);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 에러 아이콘 스타일 */
.converter-result.success p[style*="color: #ff9494"]::before {
    content: '✗';
    background: rgba(255, 100, 100, 0.15);
}

/* 다운로드 링크 스타일 개선 */
.converter-result.success a {
    color: #ff9494;
    font-weight: 500;
    text-decoration: none;
    margin-left: auto;
    padding: 6px 14px;
    background: rgba(255, 148, 148, 0.08);
    border: 1px solid rgba(255, 148, 148, 0.2);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.converter-result.success a:hover {
    background: rgba(255, 148, 148, 0.15);
    border-color: rgba(255, 148, 148, 0.4);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(255, 148, 148, 0.2);
}

/* ZIP 다운로드 버튼 스타일 개선 */
.converter-result.success .download-all {
    background: linear-gradient(135deg, #ff9494 0%, #ff7878 100%);
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    transition: all 0.3s ease;
    font-size: 14px;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 148, 148, 0.2);
}

.converter-result.success .download-all::after {
    content: none;
}

.converter-result.success .download-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 148, 148, 0.3);
    background: linear-gradient(135deg, #ff7878 0%, #ff6464 100%);
}

.converted-file-name {
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gpxconv-title {
    font-size: 1em;
    font-weight: 600;
    font-family: sans-serif;
    margin-top: 0px;
    text-align: center;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
    .converter-result.success p {
        font-size: 0.8em;
    }
    
    .converted-file-name {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
    }
    
    .gpxconv-title {
        font-size: 0.75em;
    }
    
    .converted-file-extension {
        white-space: nowrap;
        margin-left: 4px;
        flex-shrink: 0;
    }
    
    .file-size {
        display: none;
    }
    
    .file-info {
        display: flex;
        align-items: center;
        gap: 15px;
        overflow: hidden;
        flex: 1;
    }
    
    .remove-file .remove-text {
        display: none;
    }
    
    .converter-wrapper {
        padding: 20px;
    }
    
    .converter-title {
        font-size: 1.1em !important;
    }
    
    .converter-actions {
        flex-direction: column;
    }
    
    .converter-result.success {
        padding: 14px 16px;
    }
    
    .download-link .download-text {
        display: none;
    }
    
    .converter-result.success a {
        align-self: flex-start;
    }
}