* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #a018cb;
    --primary-dark: #7a129b;
    --primary-light: #c44be6;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --danger: #dc3545;
    --danger-dark: #c82333;
    --success: #28a745;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 70px;
}

/* Navigation Bars */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 20px;
    z-index: 1000;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.navbar-top {
    top: 0;
    bottom: auto;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-top: none;
    justify-content: space-between;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
    background: rgba(160, 24, 203, 0.1);
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    font-size: 14px;
    color: var(--text-light);
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 80px;
    padding-bottom: 80px;
}

.container.no-nav {
    padding-bottom: 20px;
}

/* Welcome Header */
.welcome-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    text-align: center;
}

.welcome-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.welcome-header p {
    opacity: 0.9;
    font-size: 14px;
    margin-bottom: 15px;
}

.header-stats {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 10px;
}

/* Header for other pages */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

/* Posts Grid */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

/* Post Author Info */
.post-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.author-details {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
    font-size: 16px;
}

.post-time {
    font-size: 12px;
    color: var(--text-light);
}

.post-content {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
    word-wrap: break-word;
}

.post-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.gallery-item {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Video Container */
.video-container {
    position: relative;
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-container video {
    width: 100%;
    max-height: 400px;
    outline: none;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--primary);
    color: var(--white);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-secondary {
    background: var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-dark);
}

.btn-success {
    background: var(--success);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Media Type Selector */
.media-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.media-type-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.media-type-btn.active {
    border-color: var(--primary);
    background: rgba(160, 24, 203, 0.1);
    color: var(--primary);
}

/* Media Preview */
.media-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.media-preview img, 
.media-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.images-grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.image-preview-item {
    position: relative;
    padding-top: 100%;
}

.image-preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.remove-media {
    position: absolute;
    top: -8px;
    right: -8px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Skeleton Loading */
.skeleton-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.skeleton-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-author {
    width: 120px;
    height: 18px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-time {
    width: 80px;
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-content {
    width: 100%;
    height: 100px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-top: 12px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}

/* Alert Messages */
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* User List */
.users-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.user-username {
    font-size: 12px;
    color: var(--text-light);
}

.user-role {
    font-size: 12px;
    color: var(--primary);
    margin-top: 4px;
}

.user-actions {
    display: flex;
    gap: 8px;
}

/* User Info Card */
.user-info-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* Profile Picture Upload */
.profile-preview {
    margin-top: 10px;
    text-align: center;
}

.profile-preview img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px;
        padding-top: 70px;
        padding-bottom: 70px;
    }
    
    .post-card {
        padding: 16px;
    }
    
    .navbar {
        padding: 8px 16px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    .nav-icon {
        font-size: 20px;
    }
    
    .welcome-header h1,
    .header h1 {
        font-size: 24px;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .author-avatar {
        width: 40px;
        height: 40px;
    }
    
    .media-type-btn {
        font-size: 12px;
        padding: 8px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}