/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
    margin-top: 60px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.file-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    position: relative;
    outline: none;
}

.file-upload-zone.has-error {
    border-color: #dc2626;
    background-color: #7f1d1d;
}

.file-upload-zone.has-file {
    border-style: solid;
    border-color: #374151;
    padding: 24px;
}

.upload-icon {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.7;
    color: #6b7280;
    letter-spacing: 2px;
}

.upload-primary {
    font-size: 16px;
    font-weight: 400;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.upload-secondary {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.file-info-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.file-name {
    font-size: 15px;
    font-weight: 500;
    color: #e5e7eb;
    word-break: break-all;
}

.file-meta {
    font-size: 13px;
    color: #9ca3af;
}

.button-text {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 150ms ease;
    flex-shrink: 0;
}

.button-text:hover {
    color: #ef4444;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-download {
    background-color: #059669;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    width: 100%;
}

.progress-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #374151;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: #9ca3af;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 2px;
    width: 0%;
    transition: width 200ms ease;
}

.progress-detail {
    font-size: 13px;
    color: #6b7280;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.output-header h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
    color: #d1d5db;
}

.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.stats-bar .stat-item {
    flex: 1 1 calc(33.333% - 12px);
    min-width: 80px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.links-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background-color: #0a0a0a;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.links-table thead {
    position: sticky;
    top: 0;
    background-color: #1a1a1a;
    z-index: 1;
}

.links-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    color: #9ca3af;
    border-bottom: 1px solid #374151;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.links-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #2a2a2a;
    color: #e5e7eb;
    vertical-align: middle;
}

.links-table tbody tr:hover {
    background-color: #1a1a1a;
}

.links-table tbody tr:last-child td {
    border-bottom: none;
}

.col-page {
    width: 60px;
    text-align: center;
}

.col-url {
    word-break: break-all;
}

.col-action {
    width: 80px;
    text-align: center;
}

.links-table td.col-page {
    text-align: center;
    font-weight: 500;
    color: #9ca3af;
}

.link-url {
    color: #3b82f6;
    text-decoration: none;
    transition: color 150ms ease;
}

.link-url:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.copy-link-btn {
    background: none;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.copy-link-btn:hover {
    background-color: #374151;
    color: #e5e7eb;
}

.copy-link-btn.copied {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff;
}

.no-links-warning {
    padding: 24px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    text-align: center;
}

.no-links-warning p {
    font-size: 14px;
    color: #9ca3af;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #141414;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 12px 24px;
    z-index: 300;
    animation: toastIn 200ms ease;
}

.toast-text {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
}

.error-text {
    font-size: 14px;
    color: #fca5a5;
    flex: 1;
}

.error-dismiss {
    background: none;
    border: none;
    color: #fca5a5;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px;
    transition: color 150ms ease;
    flex-shrink: 0;
}

.error-dismiss:hover {
    color: #ffffff;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .output-section {
        padding: 16px;
    }

    .stats-bar {
        gap: 8px;
    }

    .stats-bar .stat-item {
        flex: 1 1 calc(50% - 4px);
    }

    .stat-item {
        padding: 10px;
    }

    .stat-value {
        font-size: 14px;
    }

    .file-upload-zone {
        padding: 32px 16px;
    }

        padding: 0 16px;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .links-table th,
    .links-table td {
        padding: 10px 12px;
    }

    .col-page {
        width: 50px;
    }

    .col-action {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .stats-bar .stat-item {
        flex: 1 1 100%;
    }

    .links-table {
        font-size: 12px;
    }

    .links-table th,
    .links-table td {
        padding: 8px 10px;
    }

    .copy-link-btn {
        padding: 3px 8px;
        font-size: 11px;
    }
}