/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Login Screen */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #667eea;
    font-size: 28px;
}

.login-box input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-box input:focus {
    outline: none;
    border-color: #667eea;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-box button:hover {
    background: #5568d3;
}

.error {
    color: #e74c3c;
    margin-top: 10px;
    padding: 10px;
    background: #fee;
    border-radius: 4px;
    text-align: center;
}

/* Dashboard */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #667eea;
    font-size: 28px;
}

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

.logout-btn:hover {
    background: #c0392b;
}

/* Sections */
section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 22px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

section h3 {
    color: #764ba2;
    margin: 25px 0 15px;
    font-size: 18px;
}

.section-info {
    color: #666;
    font-size: 14px;
    margin: -10px 0 15px 0;
    font-style: italic;
}

/* Info Section */
.info-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.info-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.info-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.info-item strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.info-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Status Section */
.status-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.status-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.status-card h2 {
    font-size: 18px;
    margin-bottom: 15px;
    border: none;
    padding: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #95a5a6;
    animation: pulse 2s infinite;
}

.status-dot.blocked {
    background: #e74c3c;
}

.status-dot.allowed {
    background: #27ae60;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.time-remaining {
    margin-top: 10px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    font-size: 15px;
}

/* Computer List */
.computer-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.computer-item {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #95a5a6;
    align-items: center;
}

.computer-item.online {
    border-left-color: #27ae60;
}

.computer-item.offline {
    border-left-color: #e74c3c;
}

.computer-name {
    font-weight: 600;
    color: #333;
}

.computer-hostname {
    color: #666;
    font-size: 14px;
}

.computer-status {
    text-align: right;
    font-weight: 600;
    font-size: 14px;
}

.computer-item.online .computer-status {
    color: #27ae60;
}

.computer-item.offline .computer-status {
    color: #e74c3c;
}

.computer-item.unknown .computer-status {
    color: #95a5a6;
}

/* Buttons */
.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.bonus-buttons {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-icon {
    font-size: 18px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #229954;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #e67e22;
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #2980b9;
}

.btn-bonus {
    background: #667eea;
    color: white;
}

.btn-bonus:hover:not(:disabled) {
    background: #5568d3;
}

/* History */
.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-time {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

.history-event {
    font-weight: 600;
    color: #333;
}

.history-details {
    color: #666;
    font-size: 14px;
    text-align: right;
}

.no-history {
    text-align: center;
    color: #999;
    padding: 30px;
}

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

/* Footer */
footer {
    background: white;
    padding: 15px 30px;
    border-radius: 12px;
    text-align: center;
    color: #666;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    header h1 {
        font-size: 22px;
    }

    section {
        padding: 20px;
    }

    .status-section {
        grid-template-columns: 1fr;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .bonus-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .computer-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .computer-status {
        text-align: left;
    }

    .history-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .history-details {
        text-align: left;
    }
}

/* Scrollbar Styling */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}
