#pdf-rotator-ui {
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.rot-section { text-align: center; }
.rot-section h3, .rot-section h4 { color: #2c3e50; margin-bottom: 1rem; }

#rot-drop-zone {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1rem;
    transition: all 0.25s ease;
}

#rot-drop-zone.rot-drag {
    border-color: #4e73df;
    background: #f8f9ff;
}

.rot-icon { font-size: 48px; margin-bottom: 1rem; }
.rot-icon-ok { color: #28a745; }

#rot-drop-zone p { color: #7f8c8d; margin-bottom: 1rem; }
.rot-hint { color: #95a5a6; font-size: 14px; margin-top: 0.5rem; }
.rot-filename { color: #4e73df; font-weight: 600; margin-top: 0.5rem; }

#pdf-upload { display: none; }

.rot-btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.rot-btn-primary { background: #4e73df; color: #fff; }
.rot-btn-primary:hover { background: #3d5fc4; }
.rot-btn-secondary { background: #eef2ff; color: #334155; margin: 0 2px; }
.rot-btn-secondary:hover { background: #dbe4ff; }
.rot-btn-success { background: #28a745; color: #fff; text-decoration: none; }

.rot-link-btn {
    background: none;
    border: none;
    color: #4e73df;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    margin-left: 12px;
}

.rot-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
    text-align: left;
}

.rot-toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rot-toolbar-label { color: #64748b; font-size: 14px; }

.rot-page-info {
    text-align: left;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 1rem;
}

.rot-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.thumb-wrapper {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumb-wrapper:hover {
    border-color: #4e73df;
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.12);
}

.page-thumb {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    background: #fff;
    border-radius: 4px;
}

.page-label {
    font-size: 12px;
    margin-top: 8px;
    color: #64748b;
    font-weight: 600;
}

.thumb-controls {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.rot-thumb-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dbe4ff;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.rot-thumb-btn:hover { background: #eef2ff; }

.angle-badge {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #4e73df;
}

.rot-actions { margin-top: 1rem; }

.rot-progress-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 1rem auto;
    max-width: 420px;
}

#rot-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #4e73df, #28a745);
    transition: width 0.15s ease;
}

#rot-progress-status { color: #64748b; font-size: 14px; }

.rot-result .rot-btn { margin-top: 0.5rem; }

.rot-status {
    margin-top: 1rem;
    color: #374151;
    font-size: 14px;
}

.rot-status-error { color: #dc2626; }

@media (max-width: 640px) {
    #pdf-rotator-ui { padding: 1rem; }
    .rot-toolbar { flex-direction: column; align-items: stretch; }
    .rot-link-btn { margin-left: 0; margin-top: 8px; display: block; }
}
