:root {
    --bg: #0b0e14;
    --bg-card: #151921;
    --border: #2d333b;
    --primary: #58a6ff;
    --primary-dim: rgba(88, 166, 255, 0.1);
    --text-main: #adbac7;
    --text-bright: #cdd9e5;
    --text-muted: #768390;
    --success: #3fb950;
    --error: #f85149;
    --code-bg: #0d1117;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Base Layout */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: saturate(180%) blur(5px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo {
    color: var(--text-bright);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-bright);
}

/* Sections */
section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 700px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
}

.primary-btn:hover {
    background: #79c0ff;
}

.outline-btn {
    border-color: var(--border);
    color: var(--text-bright);
    background: var(--bg-card);
}

.outline-btn:hover {
    background: #22272e;
    border-color: #768390;
}

/* Mission Section */
.mission-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.mission-card {
    border-left: 4px solid var(--primary);
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 0 8px 8px 0;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.mission-item p {
    font-size: 15px;
    color: var(--text-main);
}

.mission-item strong {
    color: var(--primary);
}

/* Features List */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-item {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
}

.feature-item h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-item p {
    font-size: 14px;
    color: var(--text-muted);
}

/* API section */
.api-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 4rem 0;
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    color: #adbac7;
    overflow-x: auto;
    position: relative;
    margin-top: 2rem;
}

.code-block::before {
    content: "Request Example";
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 8px;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    border-bottom-left-radius: 6px;
}

/* Auth Card */
.auth-wrapper {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    bottom: -1px;
}

.tab.active {
    color: var(--text-bright);
    border-bottom: 2px solid var(--primary);
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-bright);
    font-size: 14px;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.error-msg {
    color: var(--error);
    font-size: 11px;
    min-height: 16px;
    margin-bottom: 1rem;
}

/* Dashboard List */
.device-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.device-row:last-child {
    border-bottom: none;
}

.device-key {
    font-family: monospace;
    color: var(--primary);
    background: var(--primary-dim);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

footer {
    padding: 6rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
}

/* Dashboard Layout */
.dashboard-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
}

.device-list {
    margin: 2rem 0;
}

.actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.device-info strong {
    color: var(--text-bright);
    font-size: 14px;
}

.device-date {
    font-size: 11px;
    color: var(--text-muted);
}

.device-key-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    padding: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
}

.icon-btn:hover {
    color: var(--text-bright);
    border-color: var(--text-muted);
}

.danger-btn:hover {
    color: var(--error);
    border-color: var(--error);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}