/* URL Tool Specific Styles - Standalone Design System */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    background: #f5f7fa;
    color: #1e293b;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Container */
.url-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.url-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.url-logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.url-logo-badge span:first-child {
    font-size: 1.25rem;
}

.url-logo-text {
    font-weight: 500;
    font-size: 0.75rem;
}

.url-title {
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.url-subtitle {
    color: #64748b;
    font-size: 0.9375rem;
    font-weight: 400;
}

/* SEO Description Box */
.url-seo-description {
    max-width: 800px;
    margin: 0 auto 2rem auto;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-radius: 0.75rem;
    border-left: 3px solid #f59e0b;
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* Workspace Layout */
.url-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Panels */
.url-panel {
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.url-panel:hover {
    box-shadow: 0 8px 25px -12px rgba(0,0,0,0.1);
}

.url-panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.url-panel-title {
    font-weight: 600;
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.no-margin {
    margin:0;
}

.url-detection-chip {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: #f8fafc;
    border-radius: 100px;
    color: #475569;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.url-detection-chip.active {
    background: #eef2ff;
    color: #4f46e5;
}

.url-panel-content {
    padding: 1.5rem;
}

/* Text Areas */
.url-input-area,
.url-output-area {
    width: 100%;
    min-height: 320px;
    padding: 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fefefe;
    transition: all 0.2s ease;
    resize: vertical;
    color: #1e293b;
}

.url-input-area:focus,
.url-output-area:focus {
    outline: none;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.05);
}

.url-output-area {
    background: #fafcff;
}

/* Buttons */
.url-button-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.url-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.url-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.url-btn:active {
    transform: translateY(0);
}

.url-btn-primary {
    background: #1e293b;
    border-color: #1e293b;
    color: white;
}

.url-btn-primary:hover {
    background: #0f172a;
    border-color: #0f172a;
}

.url-btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
}

/* Stats */
.url-stats {
    margin-top: 1rem;
    padding: 0.75rem 0;
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: #64748b;
    border-top: 1px solid #f1f5f9;
}

.url-stat-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Format Select */
.url-format-select {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    color: #334155;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

/* Insight Panel */
.url-insight-panel {
    background: linear-gradient(135deg, #fef9f0 0%, #fff 100%);
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(245, 158, 11, 0.1);
}

.url-insight-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #f59e0b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Warning and Info Boxes */
.url-warning-box {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-top: 0.75rem;
}

.url-info-box {
    background: #eef2ff;
    border-left: 3px solid #4f46e5;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-top: 0.75rem;
}

/* Character Grid */
.url-character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0;
}

.url-char-item {
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 0.75rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.url-char-item.danger {
    background: #fee2e2;
    border-color: #ef4444;
}

.url-char-item.safe {
    background: #d1fae5;
    border-color: #059669;
}

.url-char-original {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.875rem;
}

.url-char-encoded {
    color: #059669;
    font-size: 0.7rem;
    word-break: break-all;
    margin-top: 0.25rem;
}

.url-char-code {
    font-size: 0.6rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.url-empty-message {
    color: #94a3b8;
    text-align: center;
    grid-column: 1 / -1;
}

/* Snippets Section */
.url-snippets-section {
    background: #ffffff;
    border-radius: 1.25rem;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.url-snippets-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.url-language-select {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    color: #334155;
    font-family: inherit;
    cursor: pointer;
}

.url-code-block {
    background: #0f172a;
    margin: 0;
    padding: 1rem 1.5rem;
    position: relative;
}

.url-code-block-light {
    background: #ffffff;
    padding: 1rem;
}

.url-code-block pre {
    color: #e2e8f0;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.url-copy-snippet {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 0.25rem 0.75rem;
    font-size: 0.6875rem;
    border-radius: 0.375rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.1s ease;
    font-family: inherit;
}

.url-copy-snippet:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.url-breakdown-hint {
    font-size: 0.7rem;
    color: #64748b;
}

/* Footer */
.url-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.url-footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.url-footer-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.url-footer-links a:hover {
    color: #059669;
}

.url-footer-copyright {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Diff Badges */
.url-diff-increase {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.url-diff-decrease {
    background: #d1fae5;
    color: #059669;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Toast */
.url-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #1e293b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    z-index: 1000;
    animation: urlFadeUp 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@keyframes urlFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .url-container {
        padding: 1rem;
    }
    .url-workspace {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .url-stats {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .url-footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .url-button-group {
        gap: 0.375rem;
    }
    .url-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    .url-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .url-seo-description {
        font-size: 0.8125rem;
        padding: 0.875rem 1rem;
    }
    .url-title {
        font-size: 1.75rem;
    }
}