/* Traceroute Visualizer - Dark Theme CSS */

/* Result Container Styles */
.result-container {
    background-color: #252525;
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid #383838;
}

/* Input Section */
.tool-input {
    margin-bottom: 30px;
}

.tool-input h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.input-section {
    margin-bottom: 30px;
}

.input-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #ccc;
}

.traceroute-input {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    background-color: #333;
    color: #fff;
    resize: vertical;
    transition: border-color 0.3s ease;
    font-size: 14px;
}

/* User IP Info Display */
.user-ip-info {
    background: rgba(136, 136, 255, 0.1);
    border: 1px solid rgba(136, 136, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #ddd;
}

.user-ip-info strong {
    color: #8888ff;
}

.traceroute-input:focus {
    outline: none;
    border-color: #8888ff;
}

.traceroute-input::placeholder {
    color: #888;
}

/* Progress Bar */
.progress {
    margin: 20px 0;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
    display: none;
}

.progress-bar {
    height: 100%;
    background: #8888ff;
    width: 0%;
    transition: width 0.3s ease;
}

/* Status Messages */
.status {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.status.info {
    background: rgba(136, 136, 255, 0.1);
    color: #8888ff;
    border-left: 4px solid #8888ff;
}

.status.error {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border-left: 4px solid #ff6b6b;
}

.status.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-left: 4px solid #28a745;
}

/* Results Table */
.results {
    margin-top: 30px;
    display: none;
}

.results h2 {
    color: #fff;
    margin-bottom: 20px;
}

.results h3 {
    color: #fff;
    margin: 30px 0 15px 0;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    background: #2a2a2a;
}

.results-table th {
    background: #333;
    color: #fff;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #444;
}

.results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #444;
    color: #ddd;
    font-family: monospace;
    font-size: 13px;
}

.results-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.results-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Alternative path rows styling */
.alternative-path-row {
    border-left: 2px solid #555 !important;
}

.alternative-path-row:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* IP address links */
.results-table a {
    color: #8888ff;
    text-decoration: none;
    font-family: monospace;
    font-weight: 600;
}

.results-table a:hover {
    text-decoration: underline;
}

/* Special row styling */
.results-table tr[style*="background-color: #fff5f5"] {
    background-color: rgba(231, 76, 60, 0.1) !important;
    border-left: 4px solid #e74c3c;
}

.results-table tr[style*="background-color: #f8f9fa"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #888 !important;
}

.results-table tr[style*="background-color: #fff3cd"] {
    background-color: rgba(255, 193, 7, 0.1) !important;
    border-left: 4px solid #ffc107;
}

/* Map Container */
.map-container {
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    background: #333;
}

/* Example Section */
.example {
    margin-top: 30px;
    padding: 20px;
    background: #252525;
    border-radius: 8px;
    border-left: 4px solid #8888ff;
    border: 1px solid #383838;
}

.example h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 16px;
}

.example ol {
    margin-bottom: 20px;
    padding-left: 20px;
    color: #ddd;
}

.example ol li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.example pre {
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #ddd;
    overflow-x: auto;
    background: #333;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #444;
    margin-top: 10px;
}

.example code {
    background: #333;
    color: #8888ff;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

/* Route Statistics */
.route-statistics {
    background: rgba(136, 136, 255, 0.1);
    border: 1px solid rgba(136, 136, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #ddd;
}

.route-statistics h3 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.1em;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.stat-label {
    color: #ccc;
    font-weight: 600;
}

.stat-value {
    color: #8888ff;
    font-family: monospace;
    font-size: 1.1em;
    font-weight: bold;
}

@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Small helper text */
small {
    color: #888;
    font-size: 13px;
}

/* Leaflet map dark theme overrides */
.leaflet-container {
    background: #333 !important;
}

.leaflet-popup-content-wrapper {
    background: #2a2a2a !important;
    color: #fff !important;
    border-radius: 8px !important;
}

.leaflet-popup-content {
    color: #fff !important;
}

.leaflet-popup-content a {
    color: #8888ff !important;
}

.leaflet-popup-tip {
    background: #2a2a2a !important;
}

.leaflet-control-attribution {
    background: rgba(42, 42, 42, 0.8) !important;
    color: #ccc !important;
}

.leaflet-control-attribution a {
    color: #8888ff !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .result-container {
        padding: 15px;
        margin-top: 20px;
    }

    .traceroute-input {
        height: 150px;
        font-size: 12px;
    }


    .results-table {
        font-size: 11px;
    }

    .results-table th,
    .results-table td {
        padding: 8px 6px;
    }

    .map-container {
        height: 300px;
    }

    .example {
        padding: 15px;
    }

    .example pre {
        font-size: 11px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .tool-input h2 {
        font-size: 1.3em;
    }

    .results h2 {
        font-size: 1.2em;
    }

    .results h3 {
        font-size: 1.1em;
    }

    .results-table {
        font-size: 10px;
    }

    .map-container {
        height: 250px;
    }
}