:root {
    --primary-color: #f89922;
    --primary-hover: #e6881f;
    --secondary-color: #1d53a5;
    --secondary-hover: #164494;
    --success-color: #059669;
    --error-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #1d53a5;
    --dark-gray: #3c3f3f;
    --light-gray: #f9f9f9;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 3px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--white);
    color: var(--dark-gray);
    line-height: 1.55;
    min-height: 100vh;
    font-size: 0.9rem;
}

.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.results-container {
    grid-column: 1 / -1;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 40px;
}

.instructions-panel,
.tool-panel {
    background: var(--light-gray);
    padding: 40px;
    border-right: 1px solid var(--gray-200);
}

h1 {
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 16px;
    text-align: center;
    grid-column: 1 / -1;
}

h2 {
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h3 {
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 16px 0;
}

h4 {
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-gray);
    margin: 0 0 12px 0;
}

.container {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: var(--white);
    width: 100%;
    margin-bottom: 6px;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(248, 153, 34, 0.2);
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--secondary-hover);
}

button:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(248, 153, 34, 0.2);
}

.redirects-output {
    height: 200px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.8rem;
    background: var(--light-gray);
}

.status {
    margin: 16px 0;
    padding: 16px;
    border-radius: 8px;
    font-weight: 500;
    border-left: 4px solid;
}

.status.info {
    background: rgba(29, 83, 165, 0.1);
    border-color: var(--info-color);
    color: var(--secondary-color);
}

.status.error {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
}

.status.success {
    background: rgba(5, 150, 105, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.progress {
    margin: 16px 0;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

.url-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 24px 0;
}

.url-list {
    background: var(--light-gray);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.url-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.8rem;
}

.url-item:last-child {
    border-bottom: none;
}

.working-url {
    color: var(--success-color);
    font-weight: 500;
}

.broken-url {
    color: var(--error-color);
    font-weight: 500;
}

.instructions {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.instructions h3 {
    color: var(--secondary-color);
    margin-top: 0;
    font-weight: 600;
}

.instructions ol {
    margin: 16px 0;
    padding-left: 24px;
}

.instructions li {
    margin-bottom: 12px;
    font-weight: 400;
    font-size: 0.9rem;
}

.instructions strong {
    color: var(--dark-gray);
    font-weight: 600;
}

.bookmarklet-container {
    margin: 16px 0;
}

.bookmarklet-textarea {
    height: 170px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.65rem;
    background: var(--light-gray);
    border: 1px solid var(--gray-300);
}

.copy-button {
    margin-top: 8px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.stat-number {
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    color: var(--dark-gray);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: var(--primary-color);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toast.show {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .instructions-panel,
    .tool-panel {
        padding: 20px;
    }
    
    .instructions-panel {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .container {
        padding: 20px;
    }
    
    .url-summary {
        grid-template-columns: 1fr;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
}

.input-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.input-group input[type="text"] {
    flex: 1;
    min-width: 250px;
}

.input-group input[type="number"] {
    padding: 12px 8px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: var(--white);
    text-align: center;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(248, 153, 34, 0.2);
}

.input-group label {
    font-weight: 500;
    white-space: nowrap;
}