/* ============================================
   IP Location Checker - Modern Stylesheet
   With Full Dark Mode Support
   ConvertICO Design System
   ============================================ */

:root {
    --transition-speed: 0.25s;
    
    /* Primary Colors - Green Theme */
    --primary: #10B981;
    --primary-light: #D1FAE5;
    --primary-dark: #059669;
    --accent: #3B82F6;
    --accent-light: #DBEAFE;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --purple: #8B5CF6;
    --purple-light: #EDE9FE;
    --orange: #F97316;
    --orange-light: #FFEDD5;
    --teal: #14B8A6;
    
    /* Background Colors */
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-secondary: #f1f5f9;
    
    /* Text Colors */
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Border Colors */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Scrollbar */
    --scrollbar-track: var(--bg);
    --scrollbar-thumb: var(--text-muted);
    --scrollbar-thumb-hover: var(--text-secondary);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary: #34d399;
    --primary-light: rgba(52, 211, 153, 0.15);
    --primary-dark: #10b981;
    --accent: #60a5fa;
    --accent-light: rgba(96, 165, 250, 0.15);
    --success: #4ade80;
    --success-light: rgba(74, 222, 128, 0.15);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.15);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.15);
    --purple: #a78bfa;
    --purple-light: rgba(167, 139, 250, 0.15);
    --orange: #fb923c;
    --orange-light: rgba(251, 146, 60, 0.15);
    --teal: #2dd4bf;
    
    /* Background Colors */
    --bg: #0f172a;
    --bg-elevated: #1e293b;
    --bg-secondary: #334155;
    
    /* Text Colors */
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Border Colors */
    --border: #334155;
    --border-light: #475569;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5);
    
    /* Scrollbar */
    --scrollbar-track: var(--bg-elevated);
    --scrollbar-thumb: var(--text-muted);
    --scrollbar-thumb-hover: var(--text-secondary);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.hidden { display: none !important; }

/* Container */
.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
}

.tool-icon-wrapper i { width: 28px; height: 28px; }

.tool-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Tool */
.tool-main {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

/* ============================================
   CHECK MY IP - Prominent Box
   ============================================ */
.my-ip-box {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border-bottom: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

[data-theme="dark"] .my-ip-box {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(52, 211, 153, 0.05));
}

.my-ip-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.my-ip-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.my-ip-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.my-ip-icon i { width: 26px; height: 26px; }

.my-ip-info {
    display: flex;
    flex-direction: column;
}

.my-ip-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.my-ip-address {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'SF Mono', Monaco, monospace;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.my-ip-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-check-my-ip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-check-my-ip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-check-my-ip i { width: 20px; height: 20px; }

/* Input Section */
.input-section {
    padding: 2rem;
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.mode-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-tab i { width: 18px; height: 18px; }

.mode-tab:hover { border-color: var(--primary-light); }

.mode-tab.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}

[data-theme="dark"] .mode-tab.active {
    background: rgba(52, 211, 153, 0.15);
    color: var(--primary);
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    transition: all 0.3s ease;
    max-width: 650px;
    margin: 0 auto;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .search-box:focus-within {
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

.search-icon {
    padding: 0.75rem;
    color: var(--text-muted);
    display: flex;
}

.search-icon i { width: 22px; height: 22px; }

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 0.5rem;
    font-size: 1rem !important;
    color: var(--text);
    outline: none;
    min-width: 0;
}

.search-input::placeholder { color: var(--text-muted); }

.search-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-btn i { width: 20px; height: 20px; }

.search-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.search-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.input-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* Bulk Input */
.bulk-wrapper {
    max-width: 650px;
    margin: 0 auto;
}

.bulk-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--text);
    background: var(--bg);
    resize: vertical;
    min-height: 150px;
    transition: all 0.3s ease;
}

.bulk-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .bulk-textarea:focus {
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn i { width: 18px; height: 18px; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #2563EB);
    color: white;
}

.btn-accent:hover { transform: translateY(-1px); }

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--text-muted);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-sm i { width: 16px; height: 16px; }

/* Copy Button */
.copy-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.copy-btn i { width: 16px; height: 16px; }

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

.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Inline Copy Button (for info rows) */
.copy-inline {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    opacity: 0;
    padding: 0;
}

.copy-inline i { width: 12px; height: 12px; }

.info-row:hover .copy-inline { opacity: 1; }

.copy-inline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.copy-inline.copied {
    opacity: 1;
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* Progress */
.progress-section {
    padding: 2rem;
    text-align: center;
}

.progress-bar {
    height: 6px;
    background: var(--bg);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1rem;
}

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

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Error Box - No border-left */
.error-box {
    margin: 1rem 2rem;
    padding: 1rem 1.5rem;
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    color: var(--danger);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-box i { width: 20px; height: 20px; flex-shrink: 0; }

/* Results Section */
.results-section {
    padding: 2rem;
    animation: fadeIn 0.4s ease;
}

/* Single Result */
.result-card {
    animation: fadeIn 0.4s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.result-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.result-flag {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    flex-shrink: 0;
}

.result-flag i { width: 28px; height: 28px; color: var(--primary); }

.result-flag img {
    width: 40px;
    height: auto;
    border-radius: 4px;
}

.result-title h3 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.result-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

/* Resolved Banner */
.resolved-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.resolved-banner i { color: var(--accent); width: 20px; height: 20px; flex-shrink: 0; }

/* CIDR Banner */
.cidr-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--purple-light);
    border: 1px solid var(--purple);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.cidr-banner i { color: var(--purple); width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }

.cidr-info { flex: 1; }

.cidr-info strong { color: var(--text); display: block; margin-bottom: 0.25rem; }

.cidr-info span { color: var(--text-secondary); font-size: 0.85rem; }

/* Location Hero */
.location-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

[data-theme="dark"] .location-hero {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.1), rgba(96, 165, 250, 0.1));
}

.location-flag-large {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.location-flag-large i { width: 36px; height: 36px; color: var(--primary); }

.location-flag-large img {
    width: 48px;
    height: auto;
    border-radius: 4px;
}

.location-main h4 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    color: var(--text);
}

.location-main p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Local Time Display */
.local-time-display {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.local-time-display i { width: 16px; height: 16px; }

.local-time-value {
    font-weight: 600;
    color: var(--text-secondary);
    font-family: 'SF Mono', Monaco, monospace;
}

/* Result Grid */
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.result-panel {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.panel-header {
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.panel-header i { width: 18px; height: 18px; }

.panel-header.location { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.panel-header.network { background: linear-gradient(135deg, var(--accent), #2563EB); }
.panel-header.coordinates { background: linear-gradient(135deg, var(--purple), #7C3AED); }
.panel-header.classification { background: linear-gradient(135deg, var(--orange), #EA580C); }

.panel-body { padding: 1rem; }

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    gap: 0.5rem;
}

.info-row:last-child { border-bottom: none; }

.info-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.info-label i { width: 14px; height: 14px; opacity: 0.7; }

.info-value {
    color: var(--text);
    font-weight: 500;
    font-size: 0.85rem;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-ipv4 { background: var(--accent-light); color: #1d4ed8; }
.badge-ipv6 { background: #fce7f3; color: #be185d; }

[data-theme="dark"] .badge-ipv4 { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
[data-theme="dark"] .badge-ipv6 { background: rgba(244, 114, 182, 0.2); color: #f472b6; }

.badge-type {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.badge-residential { background: var(--primary-light); color: #059669; }
.badge-datacenter { background: var(--accent-light); color: #1d4ed8; }
.badge-vpn { background: #fce7f3; color: #be185d; }
.badge-mobile { background: var(--warning-light); color: #d97706; }
.badge-unknown { background: var(--bg); color: var(--text-secondary); }

[data-theme="dark"] .badge-residential { background: rgba(52, 211, 153, 0.2); color: #34d399; }
[data-theme="dark"] .badge-datacenter { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
[data-theme="dark"] .badge-vpn { background: rgba(244, 114, 182, 0.2); color: #f472b6; }
[data-theme="dark"] .badge-mobile { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
[data-theme="dark"] .badge-unknown { background: var(--bg-secondary); color: var(--text-muted); }

.badge-confidence {
    background: var(--bg);
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

.badge-resolved {
    background: var(--accent-light);
    color: #1d4ed8;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

[data-theme="dark"] .badge-resolved {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

/* Map */
.map-section {
    margin-top: 1.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
}

.map-header {
    padding: 0.875rem 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-header i { width: 18px; height: 18px; color: var(--primary); }

#locationMap {
    height: 280px;
    width: 100%;
}

/* Dark mode map filter */
[data-theme="dark"] #locationMap {
    filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9);
}

.map-footer {
    padding: 0.75rem 1rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

/* Export */
.export-section {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Bulk Results */
.bulk-results {
    animation: fadeIn 0.4s ease;
}

.bulk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.bulk-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.25rem;
}

.bulk-header h3 i { width: 24px; height: 24px; color: var(--primary); }

.bulk-count {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.bulk-table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.bulk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.bulk-table th {
    background: var(--bg);
    color: var(--text);
    padding: 0.875rem 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.bulk-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.bulk-table tr:last-child td { border-bottom: none; }
.bulk-table tr:hover { background: var(--bg); }
.bulk-table tr.error-row { background: var(--danger-light); }
.bulk-table tr.error-row:hover { background: var(--danger-light); }

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

/* Related Section */
.related-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    flex-wrap: wrap;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.related-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.related-label i { width: 18px; height: 18px; color: var(--primary); }

.related-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.related-link i { width: 16px; height: 16px; }

.related-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Info Grid */
.info-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.info-card h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    color: var(--text);
    margin: 0 0 1.5rem;
}

.info-card h2 i { color: var(--primary); width: 24px; height: 24px; }

/* Steps */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.steps-list li {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 1rem;
    counter-increment: step;
    color: var(--text-secondary);
}

.steps-list li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0.9rem;
    top: 2rem;
    bottom: 0;
    width: 2px;
    background: var(--primary-light);
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.feature-box {
    display: flex;
    gap: 0.875rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.feature-icon i { width: 20px; height: 20px; }

.feature-icon.green { background: linear-gradient(135deg, var(--success), #059669); }
.feature-icon.blue { background: linear-gradient(135deg, var(--accent), #2563EB); }
.feature-icon.purple { background: linear-gradient(135deg, var(--purple), #7C3AED); }
.feature-icon.orange { background: linear-gradient(135deg, var(--orange), #EA580C); }

.feature-text h4 {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    color: var(--text);
}

.feature-text p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* FAQ */
.faq-list { display: grid; gap: 0.75rem; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-speed);
}

.faq-item:hover { border-color: var(--primary); }

.faq-question {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: none;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.faq-question:hover { background: var(--bg-elevated); }

.faq-question i {
    color: var(--primary);
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.faq-item.open .faq-question { background: var(--bg-elevated); }
.faq-item.open .faq-question i { transform: rotate(180deg); }

.faq-answer {
    display: none;
    padding: 0 1.25rem 1rem;
    background: var(--bg-elevated);
}

.faq-item.open .faq-answer { display: block; }

.faq-answer p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-answer a {
    color: var(--primary);
    text-decoration: none;
}

.faq-answer a:hover { text-decoration: underline; }

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 400px;
    animation: toastSlideIn 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-hiding {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-word;
}

.toast-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    padding: 0;
}

.toast-close:hover {
    background: var(--bg);
    color: var(--text);
}

.toast-close i { width: 16px; height: 16px; }

/* Toast Types */
.toast-success { border-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }

.toast-error { border-color: var(--danger); }
.toast-error .toast-icon { color: var(--danger); }

.toast-warning { border-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-info { border-color: var(--accent); }
.toast-info .toast-icon { color: var(--accent); }

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tool-container { padding: 1rem; }
    
    .tool-title-row { gap: 0.75rem; }
    
    .tool-icon-wrapper { width: 48px; height: 48px; }
    .tool-icon-wrapper i { width: 24px; height: 24px; }
    
    .my-ip-box { padding: 1.25rem; }
    
    .my-ip-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .my-ip-left {
        flex-direction: column;
    }
    
    .my-ip-right {
        justify-content: center;
    }
    
    .input-section { padding: 1.5rem; }
    .results-section { padding: 1.5rem; }
    
    .mode-tabs { flex-direction: column; }
    
    .result-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    
    .location-hero {
        flex-direction: column;
        text-align: center;
    }
    
    .action-buttons { flex-direction: column; }
    .btn { width: 100%; }
    
    .related-section {
        flex-direction: column;
        text-align: center;
    }
    
    .related-links {
        justify-content: center;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-value {
        text-align: left;
        max-width: 100%;
        justify-content: flex-start;
    }
    
    .export-section { flex-direction: column; }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .result-header { flex-direction: column; text-align: center; }
    .result-header-left { flex-direction: column; }
    
    .feature-box { flex-direction: column; text-align: center; }
    .feature-icon { margin: 0 auto; }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

/* Selection */
::selection {
    background: rgba(16, 185, 129, 0.2);
    color: var(--text);
}

[data-theme="dark"] ::selection {
    background: rgba(52, 211, 153, 0.3);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
