:root {
    --primary-color: #3b82f6;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    padding: 1.5rem 2rem;
    background: transparent;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.state {
    width: 100%;
    max-width: 1000px;
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 2.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #111;
}

#sub-title {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 4rem;
}

/* Radar Animation */
.radar-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.radar {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.02) 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle {
    position: absolute;
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 50%;
}

.circle:nth-child(1) { width: 100%; height: 100%; }
.circle:nth-child(2) { width: 66%; height: 66%; }
.circle:nth-child(3) { width: 33%; height: 33%; }

.scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(59, 130, 246, 0.4) 0deg, transparent 90deg);
    animation: rotate 3s linear infinite;
}

/* Results Grid */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin: 2rem 0;
}

.device-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #edf2f7;
}

.device-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.device-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.device-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.device-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.connect-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.connect-btn:hover {
    background-color: #2563eb;
}

.secondary-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
}

footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.5rem;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
