/* ===== GifNeo Tool Page Styles ===== */

/* Tool Header */
.tool-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.tool-header h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.tool-header h1 span { color: #ff5722; }
.tool-tutorial {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #ff5722;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}
.tool-tutorial:hover { opacity: 0.75; }
.tool-tutorial svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Tool Workspace */
.tool-workspace {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px 56px;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #e0e0e0;
    border-radius: 16px;
    background: #fff;
    padding: 64px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: #ff5722;
    background: #fff8f5;
}
.drop-zone-icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: #fff3e0; display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.drop-zone-icon svg { width: 28px; height: 28px; stroke: #ff5722; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.drop-zone p { font-size: 13px; color: #757575; }
.drop-zone p span { color: #ff5722; font-weight: 500; text-decoration: underline; cursor: pointer; }
.drop-zone input { display: none; }

/* Editor Area */
.editor { display: none; }
.editor.active { display: block; }
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
}
@media (max-width: 900px) { .editor-layout { grid-template-columns: 1fr; } }

/* Preview Panel */
.preview-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}
.preview-video, .preview-img {
    width: 100%;
    display: block;
    background: #000;
    max-height: 480px;
    object-fit: contain;
}
.preview-img { background: #fafafa; border-radius: 8px; }
.preview-timeline {
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
}
.timeline-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}
.timeline-selection {
    position: absolute;
    top: 0; height: 100%;
    background: rgba(255,87,34,0.25);
    border-left: 3px solid #ff5722;
    border-right: 3px solid #ff5722;
    border-radius: 3px;
}
.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    color: #757575;
}

/* Settings Panel */
.settings-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.setting-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.setting-group input[type="range"] {
    width: 100%;
    accent-color: #ff5722;
}
.setting-row { display: flex; gap: 10px; }
.setting-row .setting-group { flex: 1; }
.setting-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #1a1a1a;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s;
}
.setting-input:focus { border-color: #ff5722; }
.range-value {
    float: right;
    font-size: 12px;
    font-weight: 600;
    color: #ff5722;
}
.btn-convert {
    width: 100%;
    padding: 12px;
    background: #ff5722;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.btn-convert:hover { background: #e64a19; }
.btn-convert:active { transform: scale(0.98); }
.btn-convert:disabled { background: #ccc; cursor: not-allowed; }

/* Progress */
.progress-area {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    margin-top: 18px;
}
.progress-area.active { display: block; }
.progress-bar-bg {
    width: 100%; height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden; margin: 16px 0 10px;
}
.progress-bar-fill {
    height: 100%; background: #ff5722; border-radius: 4px; width: 0%; transition: width 0.3s;
}
.progress-text { font-size: 13px; color: #757575; }

/* Result */
.result-area {
    display: none;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 18px;
    text-align: center;
}
.result-area.active { display: block; }
.result-preview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.result-info { font-size: 13px; color: #757575; margin-bottom: 16px; }
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-download:hover { background: #43a047; }
.btn-download svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #757575;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-left: 10px;
    transition: border-color 0.2s;
}
.btn-reset:hover { border-color: #ff5722; color: #ff5722; }
