/* URL Encoder/Decoder - Light Theme */


/* Dark mode overrides */
[data-theme="dark"] {
    --tool-bg: #0f172a;
    --tool-border: #334155;
    --tool-border-hover: #475569;
    --tool-text: #f8fafc;
    --tool-text-secondary: #94a3b8;
    --tool-input-bg: #1e293b;
    --tool-input-border: #334155;
    --tool-button-bg: #1e293b;
    --tool-button-hover: #334155;
    --tool-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --tool-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --surface-color: #1e293b;
    --surface-hover: #334155;
    --background-color: #0f172a;
    --text-color: #f8fafc;
    --status-info: rgba(96, 165, 250, 0.2);
    --status-success: rgba(34, 197, 94, 0.2);
    --status-error: rgba(248, 113, 113, 0.2);
    --bg-color: #0f172a;
}

/* Dark mode element overrides */
[data-theme="dark"] .tool-card {
    background: var(--bg-card, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] .tool-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--input-bg, #1e293b);
    color: var(--text-primary, #f8fafc);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .tab-btn.active {
    color: white;
}

[data-theme="dark"] label {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--text-primary, #f8fafc);
}

[data-theme="dark"] p {
    color: var(--text-secondary, #cbd5e1);
}
.tool-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.input-section, .analysis-section, .batch-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.batch-section {
    border-bottom: none;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.textarea-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.textarea-header label {
    font-weight: 600;
    color: var(--text-secondary);
}

.url-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.url-status.valid {
    background: var(--color-green-soft);
    color: var(--text-success);
}

.url-status.invalid {
    background: var(--color-red-soft);
    color: var(--danger-color);
}

.url-status.encoded {
    background: var(--color-blue-soft);
    color: var(--primary-hover);
}

.form-group textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: var(--bg-primary);
    color: var(--text-secondary);
    resize: vertical;
    transition: border-color 0.2s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea[readonly] {
    background: var(--bg-secondary);
    cursor: default;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #3b82f6;
    color: var(--bg-primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-color);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #10b981;
    color: var(--bg-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--success-color);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

.btn-outline:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.copy-btn {
    position: absolute;
    top: 2.5rem;
    right: 0.5rem;
    padding: 0.5rem 1rem;
    min-width: auto;
}

.url-analysis {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.url-analysis h4 {
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.url-parts {
    display: grid;
    gap: 0.75rem;
}

.url-part {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    gap: 1rem;
}

.part-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 80px;
}

.part-value {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    word-break: break-all;
    flex: 1;
}

.part-value.empty {
    color: var(--text-muted);
    font-style: italic;
}

.encoding-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.encoding-option {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.encoding-option:hover {
    border-color: #3b82f6;
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.encoding-option.active {
    border-color: #3b82f6;
    background: var(--color-blue-soft);
}

.encoding-option-title {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.encoding-option-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.batch-urls {
    display: grid;
    gap: 1rem;
}

.batch-url-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.batch-url-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.batch-url-index {
    font-weight: 600;
    color: var(--text-secondary);
}

.batch-url-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.batch-url-status.success {
    background: var(--color-green-soft);
    color: var(--text-success);
}

.batch-url-status.error {
    background: var(--color-red-soft);
    color: var(--danger-color);
}

.batch-url-content {
    display: grid;
    gap: 0.5rem;
}

.batch-url-original,
.batch-url-result {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.batch-url-original {
    color: var(--text-muted);
}

.batch-url-result {
    color: var(--text-secondary);
}

.batch-url-error {
    color: var(--danger-color);
    font-style: italic;
}

.batch-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.batch-stat {
    text-align: center;
}

.batch-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
}

.batch-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.info-panel {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.info-panel h3 {
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

.info-panel > p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.info-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-item h4 {
    color: var(--text-primary);
    margin: 0.5rem 0;
    font-size: 1rem;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.tips-section h4 {
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.tips-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-section li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    line-height: 1.5;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 1.5rem;
}

.tips-section li:last-child {
    border-bottom: none;
}

.tips-section li::before {
    content: '🔗';
    position: absolute;
    left: 0;
    top: 0.5rem;
}

/* Loading and error states */
.processing {
    opacity: 0.7;
    pointer-events: none;
}

.error-state {
    border-color: #ef4444 !important;
    background: var(--color-red-soft) !important;
}

.success-state {
    border-color: #10b981 !important;
    background: var(--color-green-soft) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tool-card {
        padding: 1.5rem;
    }
    
    .textarea-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .encoding-options {
        grid-template-columns: 1fr;
    }
    
    .url-part {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .part-label {
        min-width: auto;
    }
    
    .batch-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .info-features {
        grid-template-columns: 1fr;
    }
    
    .copy-btn {
        position: static;
        margin-top: 0.5rem;
    }
}



