* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #000000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    height: 100vh;
    width: 100%;
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    background: #000000;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Header Styles */
.app-header {
    background: #000000;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.5px solid #262626;
    z-index: 10;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f09433, #d62976, #962fbf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo i {
    background: none;
    color: #d62976;
    margin-right: 4px;
}

.header-icons {
    display: flex;
    gap: 22px;
}

.header-icons i {
    font-size: 1.5rem;
    color: #ffffff;
    cursor: pointer;
}

/* Content Area */
.content-area {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Home Page Styles */
.home-feed {
    max-width: 600px;
    margin: 0 auto;
    padding: 8px 0;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.hero-section h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.hero-section p {
    font-size: 1rem;
    opacity: 0.9;
}

.features-section {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.feature-card {
    background: #121212;
    border: 0.5px solid #262626;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: #0095f6;
    margin-bottom: 12px;
}

.feature-card h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: #8e8e8e;
    font-size: 0.85rem;
    line-height: 1.4;
}

.stats-section {
    display: flex;
    justify-content: space-around;
    padding: 30px 20px;
    background: #121212;
    margin: 20px;
    border-radius: 16px;
    border: 0.5px solid #262626;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0095f6;
}

.stat-label {
    font-size: 0.75rem;
    color: #8e8e8e;
    margin-top: 5px;
}

.cta-section {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    margin: 20px;
    border-radius: 16px;
}

.cta-section h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.cta-section p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}

.cta-button {
    background: white;
    color: #f5576c;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.cta-button:hover {
    transform: scale(1.05);
}

/* Reels Page Styles */
.reel-feed {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
}

.reel-feed::-webkit-scrollbar {
    width: 0;
}

.reel-item {
    scroll-snap-align: start;
    height: 100vh;
    background: #000000;
    position: relative;
}

.reel-content {
    height: 100%;
    position: relative;
}

.post-header-reel {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5;
    background: linear-gradient(0deg, transparent, rgba(0,0,0,0.4));
    padding: 8px 12px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
}

.avatar-reel {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f09433, #d62976);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 1.5px solid #ffffff;
}

.post-img-reel {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-actions {
    position: absolute;
    bottom: 80px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 10;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: white;
    cursor: pointer;
}

.action-btn i {
    font-size: 1.8rem;
}

.caption-reel {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 70px;
    color: white;
    background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent);
    padding: 12px;
    border-radius: 12px;
}

/* Bottom Navigation */
.bottom-nav {
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    border-top: 0.5px solid #262626;
    padding: 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-icon {
    font-size: 1.6rem;
    color: #8e8e8e;
    cursor: pointer;
    text-align: center;
    flex: 1;
    transition: color 0.2s;
}

.nav-icon.active {
    color: #0095f6;
}

.nav-icon:hover {
    color: #ffffff;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    display: none;
}

.modal-overlay.active {
    display: block;
}

.upload-sheet, .profile-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #121212;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 24px 20px 32px;
    z-index: 101;
    transform: translateY(100%);
    transition: transform 0.3s;
    max-width: 500px;
    margin: 0 auto;
}

.upload-sheet.open, .profile-sheet.open {
    transform: translateY(0);
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: white;
}

.close-sheet {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

.upload-area {
    background: #1e1e1e;
    border: 1.5px dashed #3a3a3a;
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
}

.upload-area i {
    font-size: 3rem;
    color: #0095f6;
}

.caption-input {
    width: 100%;
    padding: 14px;
    background: #1e1e1e;
    border: 0.5px solid #333;
    border-radius: 14px;
    color: white;
    margin: 12px 0;
}

.share-btn {
    background: #0095f6;
    color: white;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-weight: bold;
    cursor: pointer;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 16px;
}

.grid-post {
    aspect-ratio: 1;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.grid-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 500px) {
    .features-section {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 20px;
    }
}