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

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

.container {
    max-width: 600px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

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

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

.status-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.status-card.connected {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.status-card.disconnected {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
    color: white;
}

.status-card.config {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.status-icon {
    font-size: 2.5rem;
    margin-right: 20px;
}

.status-text {
    flex: 1;
}

.status-text > div:first-child {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.status-text > div:last-child {
    opacity: 0.8;
    line-height: 1.4;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.4rem;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.advanced-settings {
    margin: 25px 0;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.advanced-settings summary {
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 500;
    color: #667eea;
    user-select: none;
}

.advanced-settings summary:hover {
    background: #e9ecef;
}

.advanced-settings[open] summary {
    border-bottom: 1px solid #e1e5e9;
}

.advanced-settings .form-group {
    margin: 20px 15px;
}

.advanced-settings .form-group:last-child {
    margin-bottom: 15px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-bottom: 15px;
}

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

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.4);
}

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

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.button-group .btn {
    flex: 1;
}

.network-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-top: 15px;
}

.network-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e1e5e9;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.network-item:hover {
    background: #f8f9fa;
}

.network-item.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.network-info {
    flex: 1;
}

.network-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.network-details {
    font-size: 0.9rem;
    opacity: 0.7;
}

.network-signal {
    text-align: center;
    min-width: 60px;
}

.signal-bars {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 2px;
    margin-bottom: 4px;
}

.bar {
    width: 4px;
    background: #ddd;
    border-radius: 2px;
}

.bar:nth-child(1) { height: 6px; }
.bar:nth-child(2) { height: 10px; }
.bar:nth-child(3) { height: 14px; }
.bar:nth-child(4) { height: 18px; }

.bar.active {
    background: #28a745;
}

.network-item.selected .bar.active {
    background: rgba(255, 255, 255, 0.8);
}

.signal-quality {
    font-size: 0.8rem;
    opacity: 0.7;
}

.loading, .error, .no-networks {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

.error {
    color: #dc3545;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        max-width: 100%;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .card, .status-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .status-card {
        flex-direction: column;
        text-align: center;
    }
    
    .status-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .card, .status-card {
        padding: 15px;
    }
    
    .network-item {
        padding: 12px;
    }
    
    .btn {
        padding: 10px 20px;
    }
}