:root {
    --color-1: #0f172a;
    --color-2: #38bdf8;
    --color-3: #a855f7;
    --color-4: #1e293b;
    --color-5: #0f172a;
    --accent-color: #38bdf8;
    --accent-secondary: #a855f7;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --nav-height: 65px;
    --header-height: 60px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--color-1);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* Background Shimmer */
.bg-shimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, var(--color-2) 0%, transparent 50%);
    opacity: 0.05;
    filter: blur(80px);
}

/* Auth Screen */
.auth-screen {
    position: fixed;
    inset: 0;
    background: var(--color-1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

/* Loading state */
.auth-btn.loading {
    position: relative;
    color: transparent !important;
}

.auth-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 15px;
    color: white;
    font-family: inherit;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.auth-btn-primary {
    background: var(--accent-color);
    color: var(--color-1);
}

.auth-btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.auth-btn-link {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.9rem;
    cursor: pointer;
    display: block;
    margin: 1rem auto 0;
}

/* App Layout */
.mobile-app {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mobile-header {
    height: var(--header-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

.mobile-header-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.mobile-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: calc(var(--nav-height) + 20px);
}

.mobile-nav {
    height: var(--nav-height);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 1.4rem;
}

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

/* Cards & Components */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.link-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.link-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Tab View System */
.tab-view {
    display: none;
}

.tab-view.active {
    display: block;
}
