:root {
    --app-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --brand: #4f46e5;
    --brand-dark: #4338ca;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 10px rgba(0,0,0,0.06);
}

html, body {
    background: var(--app-bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

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

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

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

.nav-item.add-status-button {
    color: white;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
    transform: translateY(-20px);
    border: 4px solid white;
}
.nav-item.add-status-button i {
    margin: 0;
    font-size: 2rem;
}

/* Add padding to body/main to prevent content being hidden behind nav */
body {
    padding-bottom: 70px; /* Height of bottom nav */
    padding-top: 60px; /* Height of top header */
}

/* Main Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 0 15px;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--brand);
    text-decoration: none;
    display: flex;
    align-items: center;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.action-btn {
    font-size: 1.4rem;
    color: #4a5568;
    text-decoration: none;
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
    body {
        padding-bottom: 0;
    }
}

/* Status Feed */
.status-feed-container {
    max-width: 540px;
    margin: 0 auto;
    padding: 0 12px;
}

.status-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.status-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.status-card-header {
    display: flex;
    align-items: center;
    padding: 12px 14px;
}

.status-card-header .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
}

.status-card-header .username {
    font-weight: 600;
    font-size: 0.9rem;
}

.status-media {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f0f2f5;
}

.status-media img,
.status-media video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f0f2f5;
}
.media-container img,
.media-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-actions {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    gap: 15px;
}

.status-actions .action-btn {
    font-size: 1.5rem;
    color: #262626;
    cursor: pointer;
    transition: color 0.2s;
}

.status-actions .action-btn:hover {
    color: #8e8e8e;
}

.status-actions .action-btn.liked {
    color: #ed4956;
}

.share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}
.share-link {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
}
.share-link.wa { color: #25D366; }
.share-link.fb { color: #1877F2; }
.share-link.tw { color: #1DA1F2; }
.share-link.tg { color: #26A4E3; }
.share-link.generic { color: var(--brand); }
.share-link.copied { background: #dcfce7; color: #14532d; }

.status-likes {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 15px;
}

.status-caption {
    padding: 8px 15px 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.status-caption .username {
    font-weight: 600;
    margin-right: 5px;
}

.status-card-text-only {
    padding: 20px;
    font-size: 1.1rem;
    line-height: 1.5;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
}
.status-card-text-only .status-caption {
    padding: 0;
    color: white;
}
.status-card-text-only .username {
    display: none;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}
.hero p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 20px;
}


/* Profile Page Styles */
.profile-header {
    background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 0 0 20px 20px;
    text-align: center;
    margin-bottom: 20px;
    margin-top: -20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #4f46e5;
    font-size: 2.5rem;
    border: 4px solid rgba(255,255,255,0.3);
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.stat-box {
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.stat-number {
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.profile-menu {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s;
}

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

.menu-item:hover {
    background: #f9fafb;
}

.menu-item i {
    width: 30px;
    color: #6b7280;
}

.menu-item span {
    flex: 1;
}

.menu-item .arrow {
    color: #d1d5db;
}

/* Earnings Page */
.balance-card {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 25px;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}

.withdraw-btn {
    background: white;
    color: #10b981;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.withdraw-btn:hover {
    transform: translateY(-2px);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 15px;
}
.category-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-decoration: none;
    color: #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.category-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #4f46e5;
}
.category-card span {
    font-weight: 600;
    font-size: 1rem;
}

.container {
    max-width: 540px;
    margin: 0 auto;
    padding: 0 15px;
}

.static-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    line-height: 1.7;
    color: #374151;
}
.static-content h1,
.static-content h2,
.static-content h3 {
    margin: 0 0 12px;
    color: #111827;
}
.static-content img,
.static-content video,
.static-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 10px auto;
}
.static-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}
.static-content table th,
.static-content table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
}

.auth-container {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f3f4f6;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 24px;
}
.auth-header h2 {
    margin: 0 0 8px;
    color: #111827;
}
.auth-header p {
    color: #6b7280;
    margin: 0 0 16px;
}
.auth-form .form-group {
    margin-bottom: 14px;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-primary {
    background: var(--brand);
    color: #fff;
}
.btn-primary:hover {
    background: var(--brand-dark);
}
.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}
.btn-block {
    width: 100%;
}
.alert {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}
.alert-success {
    background: #dcfce7;
    color: #14532d;
}
.auth-footer {
    text-align: center;
    margin-top: 10px;
}

/* Page Header */
.page-header {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Status Grid (for trending, categories, etc.) */
.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.status-grid-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: #f0f2f5;
}

.status-grid-item a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.status-grid-item img,
.status-grid-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-grid-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 1.1rem;
}

.status-grid-item:hover .overlay {
    opacity: 1;
}

.status-grid-item .overlay span {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.status-grid-item .text-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9rem;
    color: #333;
    overflow: hidden;
}

/* Responsive adjustments for grids */
@media (max-width: 768px) {
    .status-grid {
        gap: 2px;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}
