* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
}

.container {
    background: #1e1e2e;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    padding: 40px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    border: 1px solid #333;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #667eea;
    flex-wrap: wrap;
    gap: 15px;
}

h1 {
    color: #667eea;
    margin: 0;
    font-size: 2em;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#usernameDisplay {
    color: #e0e0e0;
    font-weight: bold;
    font-size: 14px;
}

.logout-btn {
    padding: 10px 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.4);
}

.add-type-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: #2a2a3e;
    color: #b0b0b0;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #333;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.add-form-container {
    animation: fadeIn 0.3s ease-in;
}

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

.add-ip-section {
    background: #2a2a3e;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #444;
}

.add-ip-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.add-ip-form input {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.add-ip-form input:focus {
    outline: none;
    border-color: #667eea;
}

#addIpBtn {
    padding: 15px 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

#addIpBtn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.example-hints {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.hint-tag {
    color: #667eea;
    font-weight: bold;
    font-size: 13px;
}

.hint-item {
    background: #1e1e2e;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: #b0b0b0;
    border: 1px solid #444;
    cursor: pointer;
    transition: all 0.3s;
}

.hint-item:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.notification-settings {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #444;
}

.sound-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 500;
}

.sound-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.sound-toggle span {
    user-select: none;
}

.monitoring-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 1200px) {
    .monitoring-sections {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .monitoring-sections {
        grid-template-columns: 1fr;
    }
}

.ip-monitor-card {
    background: #2a2a3e;
    border-radius: 12px;
    padding: 12px;
    border: 2px solid #444;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    min-height: auto;
}

.ip-monitor-card:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.ip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ip-title {
    font-size: 16px;
    font-weight: bold;
    color: #e0e0e0;
    flex: 1;
}

.remove-ip-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.remove-ip-btn:hover {
    background: #c62828;
    transform: scale(1.1);
}

.ip-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.ip-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.start-monitor-btn {
    background: #4CAF50;
    color: white;
}

.start-monitor-btn:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.4);
}

.stop-monitor-btn {
    background: #f44336;
    color: white;
}

.stop-monitor-btn:hover:not(:disabled) {
    background: #da190b;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.4);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ip-status-box {
    background: #1e1e2e;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    border: 2px solid #444;
    transition: all 0.3s;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ip-status-indicator {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.ip-status-indicator.reachable {
    background: #4CAF50;
    border: 3px solid #2e7d32;
    animation: pulse 1s infinite;
}

.ip-status-indicator.unreachable {
    background: #f44336;
    border: 3px solid #c62828;
    animation: shake 0.5s;
}

.ip-status-indicator.checking {
    background: #FFC107;
    border: 3px solid #F57C00;
    animation: spin 1s linear infinite;
}

.ip-status-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ip-status-text {
    font-size: 14px;
    font-weight: bold;
    color: #e0e0e0;
}

.ip-status-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ip-status-details p {
    margin: 0;
    color: #b0b0b0;
    font-size: 12px;
    display: flex;
    gap: 5px;
}

.ip-status-details span {
    font-weight: bold;
    color: #e0e0e0;
}

.ip-chart-container {
    background: #1e1e2e;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 6px;
    height: 140px;
    position: relative;
}

.ip-history {
    max-height: 90px;
    overflow-y: auto;
    background: #1e1e2e;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ip-history-entry {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 24px;
}

.ip-history-entry.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border-left: 4px solid #4CAF50;
}

.ip-history-entry.failure {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border-left: 4px solid #f44336;
}

.ip-history-time {
    font-size: 10px;
    color: #666;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar styling */
#historyLog::-webkit-scrollbar {
    width: 8px;
}

#historyLog::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#historyLog::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

#historyLog::-webkit-scrollbar-thumb:hover {
    background: #555;
}

