:root {
    --tik-bg: #010101;
    /* True Black */
    --tik-surface: #161823;
    /* Dark Grey for Cards/Nav */
    --tik-text: #ffffff;
    --tik-text-sec: #8a8b91;
    /* Grey text */
    --tik-red: #fe2c55;
    /* TikTok Brand Red */
    --tik-cyan: #25f4ee;
    /* TikTok Brand Cyan */
    --tik-button-bg: #fe2c55;
    --tik-button-sec: #2f303b;
    --font-stack: 'Sofia Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--tik-bg);
    color: var(--tik-text);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: 70px;
    /* Space for bottom nav */
}

/* App Shell */
.app-container {
    max-width: 480px;
    /* Mobile width cap */
    margin: 0 auto;
    min-height: 100vh;
    border-left: 1px solid #222;
    border-right: 1px solid #222;
    position: relative;
    background: var(--tik-bg);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    height: 48px;
    position: sticky;
    top: 0;
    background: var(--tik-bg);
    z-index: 100;
}

.top-title {
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-badge {
    color: var(--tik-cyan);
    font-size: 14px;
}

/* Profile Header */
.profile-header {
    text-align: center;
    padding: 20px 0;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 12px;
    position: relative;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    /* Could animate this */
    object-fit: cover;
}

.username {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.user-tag {
    font-size: 14px;
    color: var(--tik-text-sec);
    margin-bottom: 16px;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    color: var(--tik-text);
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-val {
    font-weight: 700;
    font-size: 17px;
}

.stat-label {
    font-size: 13px;
    color: var(--tik-text-sec);
    font-weight: 400;
}

/* Bio & Actions */
.bio {
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    padding: 0 32px;
    margin-bottom: 20px;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 40px;
    margin-bottom: 20px;
}

.btn-tik {
    flex: 1;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-tik:active {
    opacity: 0.8;
}

.btn-primary {
    background-color: var(--tik-button-bg);
    color: white;
}

.btn-secondary {
    background-color: var(--tik-button-sec);
    color: white;
}

.btn-icon {
    width: 44px;
    flex: none;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #222;
    margin-top: 10px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    color: var(--tik-text-sec);
    position: relative;
    cursor: pointer;
}

.tab-icon {
    font-size: 24px;
    display: block;
    margin: 0 auto;
}

.tab.active {
    color: var(--tik-text);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    background: var(--tik-text);
}

/* Content Area */
.content-area {
    padding: 16px;
    min-height: 400px;
}

/* OS Switcher */
.os-switcher {
    display: flex;
    background: var(--tik-surface);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}

.os-btn {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    color: var(--tik-text-sec);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.os-btn.active {
    background: #3a3b44;
    color: var(--tik-text);
}

/* Steps Card */
.guide-card {
    background: var(--tik-surface);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.guide-step {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.step-num {
    background: var(--tik-button-sec);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.key-box {
    background: #000;
    padding: 12px;
    border-radius: 4px;
    margin-top: 4px;
    font-family: monospace;
    font-size: 12px;
    color: var(--tik-cyan);
    word-break: break-all;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.copy-icon {
    color: var(--tik-text-sec);
}

/* Connection Types Info */
.info-card {
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
}

.info-title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-item {
    font-size: 13px;
    color: var(--tik-text-sec);
    margin-bottom: 6px;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    /* Reduced specific height */
    background: var(--tik-bg);
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--tik-text-sec);
    font-size: 10px;
    text-decoration: none;
    cursor: pointer;
}

.nav-item.active {
    color: var(--tik-text);
}

.nav-plus {
    width: 45px;
    height: 30px;
    background: linear-gradient(90deg, var(--tik-cyan) 0%, var(--tik-red) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-plus::after {
    content: '+';
    color: var(--tik-bg);
    font-weight: 900;
    font-size: 20px;
    background: white;
    width: 38px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}