html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --accent-color: #888888;
    --card-bg: rgba(42, 42, 42, 0.3);
    --overlay-opacity: 0.75;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, var(--overlay-opacity));
    pointer-events: none;
    z-index: 0;
}

body.has-wallpaper::before {
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: transform 0.2s;
}

.header:hover {
    transform: scale(1.02);
}

h1 {
    color: var(--accent-color);
    font-size: 2.5em;
    margin: 0;
    transition: color 0.3s ease;
}

h2 {
    color: #888;
    margin: 10px 0;
    font-size: 1.2em;
}

/* Tab Navigation */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tab {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.tab:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.tab.active {
    background: color-mix(in srgb, var(--accent-color) 30%, transparent);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background-color: rgba(51, 51, 51, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.ipv6-container {
    overflow: hidden;
    width: 100%;
}

.ipv6-scroll {
    font-size: 1.3rem !important;
    white-space: nowrap;
    display: inline-block;
    transition: transform 0.3s ease;
    position: relative;
}

.ipv6-card:hover .ipv6-scroll {
    animation: scrollIPv6Left 6s linear infinite;
}

@keyframes scrollIPv6Left {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(calc(-100% + 250px));
    }
    100% {
        transform: translateX(0);
    }
}

.stat-subtext {
    font-size: 0.85rem;
    color: #666;
}

.cpu-core-user,
.cpu-core-system {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 2px;
}

/* Progress Bar (System Stats) */
.sys-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.sys-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--text-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Table */
.data-table {
    width: 100%;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: visible;
    backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    text-align: left;
    color: var(--accent-color);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Search */
.search-box {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    backdrop-filter: blur(15px) saturate(180%);
}

.search-box:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #888;
}

.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Auto-Refresh Indicator */
.refresh-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--accent-color);
    font-size: 0.9rem;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.refresh-indicator i {
    margin-right: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.visible {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
}

.modal-content h2 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #888;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-buttons button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

.modal-buttons button[type="button"] {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.modal-buttons button[type="submit"] {
    background: var(--accent-color);
    color: white;
}

.modal-buttons button:hover {
    opacity: 0.8;
}

/* Tool Item */
.tool-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
}

.tool-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tool-name {
    font-weight: normal;
    color: var(--text-color);
    flex: 1;
}

.tool-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.3s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    padding: 0;
}

.tool-link:hover {
    opacity: 0.7;
}

.tool-link i {
    font-size: 0.85em;
}

.tool-actions {
    display: flex;
    gap: 0.5rem;
}

.tool-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    background-color: rgba(42, 42, 42, 0.3);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    outline: none;
}

.tool-btn:hover {
    background-color: rgba(51, 51, 51, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

.tool-btn:focus {
    outline: none;
}

.tool-btn-delete {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.3);
    overflow: hidden;
    white-space: nowrap;
}

.tool-btn-delete .delete-text {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    transition: max-width 0.3s ease, opacity 0.3s ease, margin-left 0.3s ease;
    margin-left: 0;
}

.tool-btn-delete:hover {
    background: rgba(244, 67, 54, 0.4);
    border-color: rgba(244, 67, 54, 0.6);
}

.tool-btn-delete:hover .delete-text {
    max-width: 100px;
    opacity: 1;
    margin-left: 0.5rem;
}

/* Verhindere Cursor-Blinken auf allen klickbaren Elementen */
.tool-item,
.tool-name,
.stat-card,
.tab,
button {
    user-select: none;
}

button:focus,
.tool-item:focus,
.stat-card:focus,
.tab:focus {
    outline: none;
}

/* Command Suggestions */
.command-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(42, 42, 42, 0.98);
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 2000;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    display: none;
}

.command-suggestions.visible {
    display: block;
}

.command-suggestion {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #333;
}

.command-suggestion:hover,
.command-suggestion.selected {
    background-color: rgba(136, 136, 136, 0.3);
    border-left: 3px solid var(--accent-color);
}

.command-suggestion-title {
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.command-desc {
    color: #888;
    font-size: 0.9em;
}

/* Tool Item */
.tool-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
}

.tool-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tool-name {
    font-weight: normal;
    color: var(--text-color);
    flex: 1;
}

.tool-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.3s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    padding: 0;
}

.tool-link:hover {
    opacity: 0.7;
}

.tool-link i {
    font-size: 0.85em;
}
