:root {
    --primary: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #f3f4f6;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text);
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.section {
    margin-bottom: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upload-zone {
    background: white;
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--background);
}

.upload-zone svg {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin-bottom: 20px;
}

.upload-zone h2 {
    margin-bottom: 10px;
    color: var(--text);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.stats {
    background: var(--background);
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text);
}

.waypoints-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.waypoint-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 20px;
    background: var(--background);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.waypoint-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.waypoint-thumb {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.waypoint-thumb:hover {
    transform: scale(1.05);
}

.waypoint-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.waypoint-original {
    font-size: 0.85rem;
    color: var(--text-light);
    font-family: monospace;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.field-group input,
.field-group textarea {
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.field-group input:focus,
.field-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.field-group textarea {
    resize: vertical;
    min-height: 60px;
}

.char-counter {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: right;
}

.char-counter.warning {
    color: var(--warning);
    font-weight: 600;
}

.char-counter.error {
    color: var(--danger);
    font-weight: 600;
}

.location-section,
.github-section,
.actions-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.location-section h3,
.github-section h3,
.actions-section h3 {
    margin-bottom: 15px;
    color: var(--text);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.input-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.input-group input[type="text"] {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.input-group input[readonly] {
    background: var(--background);
    color: var(--text-light);
}

.help-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 5px;
}

.help-text code {
    background: var(--background);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary);
    font-weight: 600;
}

.workflow-help {
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.buttons-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    opacity: 0.9;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .waypoint-item {
        grid-template-columns: 1fr;
    }

    .waypoint-thumb {
        width: 100%;
        height: 200px;
    }

    .card {
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.5s ease;
}
/* Repo select styling */
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: auto;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#custom-repo-group {
    margin-top: 10px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
