* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(-45deg, #0f0f0f, #1a1a1a, #0f0f0f, #2a2a2a);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}
.header h1 {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(45deg, #e74c3c, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(231, 76, 60, 0.5);
}
.header p {
    color: #bdc3c7;
    font-size: 1.1rem;
}
.warning-banner {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
    text-align: center;
    animation: warningPulse 2s ease-in-out infinite;
}
@keyframes warningPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
.warning-banner strong {
    color: #e74c3c;
    font-size: 1.2rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    min-width: 250px;
    overflow: hidden; /* Add overflow hidden */
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.stat-card h3 {
    color: #95a5a6;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.big-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
    font-variant-numeric: tabular-nums;
    min-width: 200px;
    display: inline-block;
    word-break: break-word; /* Allow word breaking if needed */
    overflow-wrap: break-word; /* Modern property for word wrapping */
}
.speed-slow { color: #e74c3c !important; }
.speed-medium { color: #f39c12 !important; }
.speed-fast { color: #2ecc71 !important; }
.main-controls {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}
.preset-btn {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid #3498db;
    color: #3498db;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}
.preset-btn:hover {
    background: rgba(52, 152, 219, 0.3);
    transform: scale(1.05);
}
.preset-btn.active {
    background: #3498db;
    color: white;
}
.custom-target {
    display: none;
    margin: 20px 0;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.custom-target input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px;
    border-radius: 5px;
    width: 100px;
    font-size: 1rem;
}
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}
.big-button {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 20px 50px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}
.big-button.paused {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}
.big-button.stop {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
}
.big-button.stats {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}
.big-button.stats:hover {
    box-shadow: 0 10px 30px rgba(155, 89, 182, 0.4);
}
.big-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.big-button:hover::before {
    width: 300px;
    height: 300px;
}
.big-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.4);
}
.big-button:disabled {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
    cursor: not-allowed;
    transform: scale(1);
}
.draining {
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.progress-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 5px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}
.progress-bar {
    height: 30px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 20px;
    width: 0%;
    transition: width 0.5s;
    position: relative;
    overflow: hidden;
}
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent
    );
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.chart-container {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    height: 300px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
canvas {
    max-width: 100%;
    max-height: 100%;
}
.advanced-settings {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.advanced-settings h3 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.3rem;
}
.settings-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.settings-section:last-child {
    border-bottom: none;
}
.settings-section h4 {
    color: #ecf0f1;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.settings-group {
    margin-bottom: 20px;
}
.settings-group label {
    display: block;
    margin-bottom: 10px;
    color: #bdc3c7;
}
.slider {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}
.method-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}
.method-toggles label {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.method-toggles input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.server-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 10px;
}
.server-select option {
    background: #1e1e1e;
}
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.input-group input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 1rem;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    margin-right: 10px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
    border-radius: 25px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3.5px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .toggle-slider {
    background-color: #3498db;
}
input:checked + .toggle-slider:before {
    transform: translateX(24px);
}
.info-section {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.info-section h2 {
    color: #3498db;
    margin-bottom: 20px;
}
.info-section ul {
    list-style: none;
    padding: 0;
}
.info-section li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.info-section li:last-child {
    border-bottom: none;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #1e1e1e;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    position: relative;
    border: 2px solid #3498db;
}
.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #95a5a6;
}
.close-modal:hover {
    color: #e74c3c;
}
.results-summary {
    margin: 20px 0;
}
.results-summary div {
    margin: 10px 0;
    font-size: 1.1rem;
}
.export-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}
.export-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}
.export-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}
#hiddenContent {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
#hiddenContent video {
    width: 1px !important;
    height: 1px !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}
.network-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.metric-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}
.metric-box h5 {
    color: #95a5a6;
    font-size: 0.9rem;
    margin-bottom: 5px;
}
.metric-box .value {
    color: #3498db;
    font-size: 1.2rem;
    font-weight: 700;
}
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .big-button {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
    .preset-buttons {
        justify-content: stretch;
    }
    .preset-btn {
        flex: 1;
        min-width: calc(50% - 5px);
    }
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    .big-button {
        width: 100%;
    }
    .alert-notification {
        right: -100%; /* Use percentage for mobile */
        max-width: calc(100vw - 40px); /* Account for padding */
    }

    .alert-notification.show {
        right: 20px;
    }

    .big-number {
        font-size: 2rem; /* Smaller on mobile */
    }

    #connectionStatus {
        font-size: 1.5rem; /* Even smaller on mobile */
    }
}
.alert-notification {
    position: fixed;
    top: 20px;
    right: -600px; /* Increased from -400px to ensure complete hiding */
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: right 0.5s;
    z-index: 999;
    max-width: 400px; /* Add max-width to control notification size */
}
.alert-notification.show {
    right: 20px;
}
.alert-notification .alert-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
}

.alert-notification p {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

.alert-notification.error {
    background: linear-gradient(45deg, #e74c3c, #c0392b) !important;
}

.alert-notification.warning {
    background: linear-gradient(45deg, #f39c12, #e67e22) !important;
}

.alert-notification.info {
    background: linear-gradient(45deg, #3498db, #2980b9) !important;
}
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.particle {
    position: absolute;
    color: #3498db;
    font-size: 20px;
    animation: fall linear;
}
@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}
.burst-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 10px;
    transition: all 0.3s;
}

.burst-high {
    background: #e74c3c;
    box-shadow: 0 0 10px #e74c3c;
}

.burst-low {
    background: #3498db;
    box-shadow: 0 0 10px #3498db;
}
.footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #95a5a6;
    font-size: 0.95rem;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.footer a:hover {
    color: #2ecc71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    transition: width 0.3s;
}

.footer a:hover::after {
    width: 100%;
}