@font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 100;
    font-display: swap;
    src: url('../fonts/roboto-slab-v24-latin-100.woff2') format('woff2'),
         url('../fonts/roboto-slab-v24-latin-100.woff') format('woff'),
         url('../fonts/roboto-slab-v24-latin-100.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/roboto-slab-v24-latin-regular.woff2') format('woff2'),
         url('../fonts/roboto-slab-v24-latin-regular.woff') format('woff'),
         url('../fonts/roboto-slab-v24-latin-regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/roboto-slab-v24-latin-700.woff2') format('woff2'),
         url('../fonts/roboto-slab-v24-latin-700.woff') format('woff'),
         url('../fonts/roboto-slab-v24-latin-700.ttf') format('truetype');
}

@font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/roboto-slab-v24-latin-900.woff2') format('woff2'),
         url('../fonts/roboto-slab-v24-latin-900.woff') format('woff'),
         url('../fonts/roboto-slab-v24-latin-900.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Slab', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    margin: 0;
}

.header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 300;
    margin: 0;
}

.header-nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #888;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #fff;
    background: #2a2a2a;
}

.nav-link.active {
    color: #fff;
    background: #2a2a2a;
}

.nav-link.active:hover {
    color: #fff;
    background: #2a2a2a;
}

.logout-link {
    color: #ff6b6b !important;
    margin-left: auto;
}

.logout-link:hover {
    color: #ff5252 !important;
    background: rgba(255, 107, 107, 0.1) !important;
}

.nav-icon {
    width: 18px;
    height: 18px;
}

.header p {
    color: #888;
    margin-top: 0.5rem;
}

.main {
    flex: 1;
    padding: 2rem;
    margin: 0 auto;
    width: 100%;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    position: absolute;
    top: 27%;
    left: 85%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    opacity: 0.05;
    z-index: 1;
}

.stat-icon-online {
    color: #81c784;
}

.stat-icon-warning {
    color: #ffb74d;
}

.stat-icon-offline {
    color: #ff7d7b;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: #4CAF50;
    position: relative;
    z-index: 2;
}

.stat-label {
    color: #888;
    margin-top: 0.5rem;
    position: relative;
    z-index: 2;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.site-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.site-card:hover {
    background: #1d1d1d;
    border-color: #555;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.site-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: #fff;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-online {
    background: #1b5e20;
    color: #81c784;
}

.status-warning {
    background: #e65100;
    color: #ffb74d;
}

.status-offline {
    background: #b71c1c;
    color: #ff7d7b;
}

.site-url {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    word-break: break-all;
}

.site-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    background: #2a2a2a;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border-color: #4caf50;
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    border-color: #2e7d32;
}

.btn-secondary {
    background: linear-gradient(135deg, #607d8b, #455a64);
    border-color: #607d8b;
    color: #ffffff;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #455a64, #37474f);
    border-color: #455a64;
}

.btn-success {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border-color: #4caf50;
    color: #ffffff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    border-color: #2e7d32;
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-color: #ff9800;
    color: #ffffff;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    border-color: #f57c00;
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-color: #f44336;
    color: #ffffff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    border-color: #d32f2f;
}

.btn-info {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border-color: #2196f3;
    color: #ffffff;
}

.btn-info:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    border-color: #1976d2;
}

.footer {
    background: #1a1a1a;
    border-top: 1px solid #333;
    padding: 1rem 2rem;
    text-align: center;
    color: #888;
}

/* Detailseite Styles */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #fff;
    margin: 0;
}

.detail-url {
    color: #888;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: #888;
}

.metric-value {
    color: #fff;
    font-weight: 500;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #888;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    color: #fff;
    background: #2a2a2a;
}

.history-card {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
}

.history-chart {
    display: flex;
    align-items: end;
    gap: 1px;
    height: 120px;
    background: #0f0f0f;
    border-radius: 6px;
    padding: 10px;
    overflow-x: auto;
}

.history-bar {
    flex: 1;
    min-width: 2px;
    background: linear-gradient(to top, #2e7d32, #4caf50);
    border-radius: 2px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-bar:hover {
    background: linear-gradient(to top, #1b5e20, #66bb6a);
    transform: scaleY(1.05);
}

/* Einstellungen Styles */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: #1b5e20;
    color: #4caf50;
    border: 1px solid #2e7d32;
}

.alert-icon {
    width: 20px;
    height: 20px;
}

.settings-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.settings-card h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 1.3rem;
}

.card-icon {
    width: 20px;
    height: 20px;
    color: #4caf50;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#site-form-card {
    display: none;
}

#site-form-card.edit-mode {
    display: block;
}

.sites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.settings-form .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    align-self: flex-start;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #888;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #333;
    border-radius: 6px;
    background: #0f0f0f;
    color: #fff;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4caf50;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    appearance: none;
    background: #0f0f0f;
    border: 2px solid #333;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background: #2e7d32;
    border-color: #2e7d32;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #b1ffb4;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label input[type="checkbox"]:hover {
    border-color: #4caf50;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 2rem;
    font-style: italic;
}

.sites-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-item {
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-item.inactive {
    opacity: 0.6;
}

.site-info {
    flex: 1;
}

.site-name {
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.site-url {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.site-details {
    color: #666;
    font-size: 0.8rem;
}

.site-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.telegram-config {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.telegram-info {
    margin-top: 2rem;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 1rem;
}

.telegram-info p {
    margin: 0 0 0.5rem 0;
    color: #fff;
}

.telegram-info ol {
    margin: 0;
    padding-left: 1.5rem;
    color: #888;
}

.telegram-info li {
    margin-bottom: 0.5rem;
}

.telegram-info a {
    color: #4caf50;
    text-decoration: none;
}

.telegram-info a:hover {
    text-decoration: underline;
}

.telegram-info code {
    background: #1a1a1a;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    color: #4caf50;
    font-size: 0.9rem;
}

.telegram-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
}

.telegram-actions .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .header, .main, .footer {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .header-nav {
        width: 100%;
        justify-content: center;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .site-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .site-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Favicon Styles */
.detail-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-favicon {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: contain;
}

/* Header Logo Styles */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.brand-link:hover {
    opacity: 0.8;
}

/* Content Changes Styles */
.content-changes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.content-change-item {
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 0.75rem;
}

.change-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.change-time {
    color: #4caf50;
    font-weight: 500;
}

.change-hash {
    color: #888;
    font-family: monospace;
    font-size: 0.9rem;
}

.change-response {
    color: #666;
    font-size: 0.9rem;
}

/* Tools Layout */
.tools-container {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

/* Sidebar */
.tools-sidebar {
    width: 250px;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 5.5rem;
}

.sidebar-header h3 {
    margin: 0 0 1.5rem 0;
    color: #fff;
    font-size: 1.2rem;
}

.tools-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    color: #ccc;
    transition: all 0.2s ease;
}

.tool-menu-item:hover {
    background: #333;
    color: #fff;
}

.tool-menu-item.active {
    background: #333;
    color: #fff;
}

.menu-icon {
    width: 18px;
    height: 18px;
}

/* Hauptbereich */
.tools-main {
    flex: 1;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 2rem;
}

.tool-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.tool-header h1 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-size: 1.8rem;
}

.tool-header p {
    margin: 0;
    color: #888;
}

/* Tool-spezifische Styles */
.tools-overview h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: #4caf50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.tool-icon i {
    width: 24px;
    height: 24px;
    color: #fff;
}

.tool-card h3 {
    color: #fff;
    margin: 0 0 0.5rem 0;
}

.tool-card p {
    color: #888;
    margin: 0 0 1rem 0;
}

.tool-form {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-top: 1rem;
}

.form-group label {
    display: block;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.check-result {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
}

.check-result h3 {
    color: #fff;
    margin: 0 0 1rem 0;
}

.result-content {
    color: #ccc;
}

.bulk-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bulk-result-item {
    padding: 0.5rem;
    background: #333;
    border-radius: 4px;
    font-family: monospace;
}

/* Tools Responsive */
@media (max-width: 768px) {
    .tools-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .tools-sidebar {
        width: 100%;
        position: static;
    }
    
    .tools-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.25rem;
    }
    
    .tool-menu-item {
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .tool-menu-item .menu-text {
        display: none;
    }
}