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

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

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

header {
    text-align: center;
    color: white;
    padding: 40px 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

nav {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

nav a {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

nav a.active {
    background: #667eea;
    color: white;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-left: 4px solid #667eea;
    padding-left: 15px;
}

.test-area {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 20px;
}

.video-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

.audio-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(235, 51, 73, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 51, 73, 0.6);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

.status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.color-block {
    width: 100%;
    height: 400px;
    margin: 20px 0;
    border-radius: 15px;
    transition: background-color 0.3s ease;
}

.resolution-info {
    text-align: center;
    padding: 20px;
    background: #e9ecef;
    border-radius: 10px;
    margin-top: 20px;
}

.resolution-info p {
    font-size: 1.2rem;
    margin: 10px 0;
}

.fps-counter {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.history-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.history-table tr:hover {
    background: #f8f9fa;
}

.history-table .type-camera { color: #007bff; }
.history-table .type-microphone { color: #28a745; }
.history-table .type-speaker { color: #ffc107; }
.history-table .type-display { color: #dc3545; }
.history-table .type-keyboard { color: #6f42c1; }
.history-table .type-mouse { color: #17a2b8; }
.history-table .type-network { color: #fd7e14; }
.history-table .type-system { color: #20c997; }

.footer {
    text-align: center;
    color: white;
    padding: 30px 0;
    opacity: 0.8;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav a {
        width: 100%;
        text-align: center;
    }
    
    .card {
        padding: 20px;
    }
    
    .audio-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
}
