@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;500;600&display=swap');

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    height: 100vh;
    overflow: hidden;
}

/* Glass Effect (Frutiger Aero) */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.window {
    width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.window-title-bar {
    background: linear-gradient(90deg, #2b5797 0%, #3c6ea0 100%);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: 600;
}

.window-title {
    font-size: 14px;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.window-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
}

.window-content {
    padding: 30px;
}

.login-container {
    text-align: center;
}

.login-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.login-container h2 {
    color: #2b5797;
    margin-bottom: 20px;
}

/* Aero Input */
.aero-input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
}

.aero-input:focus {
    outline: none;
    border-color: #2b5797;
    box-shadow: 0 0 5px rgba(43, 87, 151, 0.5);
}

/* Aero Button */
.aero-button {
    background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 100%);
    border: 1px solid #999;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    margin: 5px;
}

.aero-button:hover {
    background: linear-gradient(180deg, #f0f0f0 0%, #d0d0d0 100%);
    border-color: #666;
}

.aero-button.small {
    padding: 6px 12px;
    font-size: 12px;
}

.aero-button.danger {
    background: linear-gradient(180deg, #ff6b6b 0%, #e05555 100%);
    color: white;
    border-color: #c04141;
}

.login-message, .ban-message {
    margin-top: 10px;
    font-size: 12px;
}

.ban-message {
    color: #ff4444;
    font-weight: bold;
}

/* Main Content */
.main-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Taskbar (Windows 7 Style) */
.taskbar {
    background: linear-gradient(180deg, #1e3a5f 0%, #0f2642 100%);
    height: 40px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.start-button {
    background: linear-gradient(180deg, #2b5797 0%, #1e3a5f 100%);
    padding: 6px 15px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.start-button:hover {
    background: linear-gradient(180deg, #3c6ea0 0%, #2b5797 100%);
}

.start-button img {
    width: 20px;
    height: 20px;
}

.taskbar-tray {
    display: flex;
    gap: 15px;
    align-items: center;
}

.tray-icon {
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.clock {
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

/* Desktop */
.desktop {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    margin-bottom: 40px;
}

.widgets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Widgets */
.widget {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.widget-header {
    background: rgba(43, 87, 151, 0.8);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
}

.widget-icon {
    font-size: 20px;
}

.widget-title {
    font-size: 16px;
}

.widget-content {
    padding: 20px;
}

/* Metrics */
.metric-group {
    margin-bottom: 25px;
}

.metric-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 20px;
    font-weight: bold;
    color: #2b5797;
    margin-bottom: 8px;
}

.progress-bar {
    background: rgba(0, 0, 0, 0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.ram-fill {
    background: linear-gradient(90deg, #4caf50, #8bc34a);
}

.cpu-fill {
    background: linear-gradient(90deg, #ff9800, #ffc107);
}

.disk-fill {
    background: linear-gradient(90deg, #2196f3, #03a9f4);
}

.metric-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555;
    margin-top: 8px;
}

/* Fail2Ban */
.fail2ban-jail {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 0;
}

.fail2ban-jail:last-child {
    border-bottom: none;
}

.jail-name {
    font-weight: bold;
    color: #1e3a5f;
    margin-bottom: 5px;
    font-size: 14px;
}

.jail-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.jail-status.active {
    background: #4caf50;
    color: white;
}

.jail-status.inactive {
    background: #f44336;
    color: white;
}

.jail-stats {
    font-size: 12px;
    color: #555;
}

.jail-stats > div {
    margin: 3px 0;
}

.banned-ips {
    font-size: 11px;
    color: #ff9800;
    word-break: break-all;
}

.error {
    color: #f44336;
    font-size: 11px;
    margin-top: 5px;
}

.loading, .no-data {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* Stat items */
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 13px;
    color: #555;
}

.stat-value {
    font-size: 13px;
    font-weight: 600;
    color: #2b5797;
}

/* Scrollbar (Windows 7 Style) */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    .widgets-container {
        grid-template-columns: 1fr;
    }
    
    .window {
        width: 90%;
        margin: 20px;
    }
}