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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

header h1 {
    font-size: 28px;
    color: #2c3e50;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.count {
    background: #e3f2fd;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #1976d2;
    font-weight: 500;
}

.info-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-box code {
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
}

.info-box .hint {
    margin-top: 10px;
    font-size: 14px;
    color: #856404;
}

.empty-state {
    background: white;
    padding: 60px 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.empty-state h2 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    margin-bottom: 30px;
}

.example {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
}

.example strong {
    display: block;
    margin-bottom: 10px;
    color: #495057;
}

.example pre {
    background: #2c3e50;
    color: #fff;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 13px;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.request-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.request-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.request-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.method {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.method-get {
    background: #d4edda;
    color: #155724;
}

.method-post {
    background: #cce5ff;
    color: #004085;
}

.method-put {
    background: #fff3cd;
    color: #856404;
}

.method-delete {
    background: #f8d7da;
    color: #721c24;
}

.method-patch {
    background: #e2e3e5;
    color: #383d41;
}

.url {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #495057;
}

.timestamp {
    color: #6c757d;
    font-size: 13px;
}

.request-actions {
    display: flex;
    gap: 10px;
}

.btn, .btn-small {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    background: #007bff;
    color: white;
    transition: background 0.2s;
}

.btn:hover, .btn-small:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

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

.request-details {
    padding: 20px;
    background: #f8f9fa;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h3 {
    font-size: 16px;
    color: #495057;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dee2e6;
}

.detail-section table {
    width: 100%;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.detail-section table td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.detail-section table td:first-child {
    width: 200px;
    background: #f8f9fa;
}

.detail-section table tr:last-child td {
    border-bottom: none;
}

.detail-section pre {
    background: white;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
}

/* Channel Management */
.channels-section {
    margin-top: 20px;
}

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

.section-header h2 {
    font-size: 24px;
    color: #2c3e50;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.channel-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.channel-header {
    margin-bottom: 15px;
}

.channel-header h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.channel-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat {
    background: #e3f2fd;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    color: #1976d2;
    font-weight: 500;
}

.stat-light {
    color: #999;
    font-size: 13px;
}

.channel-url {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.channel-url code {
    flex: 1;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    min-width: 200px;
}

.channel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.channel-info-box {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.channel-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.channel-info-header h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.channel-info-header .hint {
    color: #6c757d;
    font-size: 14px;
}

.channel-url-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.channel-url-box strong {
    color: #495057;
}

.channel-url-box code {
    flex: 1;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
    min-width: 200px;
}

.channel-actions-top {
    display: flex;
    gap: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content label {
    font-weight: 500;
    color: #495057;
}

.modal-content input[type="text"] {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.modal-content input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 15px;
    }

    .request-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .request-meta {
        width: 100%;
    }

    .request-actions {
        width: 100%;
    }

    .detail-section table td:first-child {
        width: 120px;
    }

    .channels-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .channel-info-header {
        flex-direction: column;
        gap: 15px;
    }
}
