/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.logo {
    height: 35px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    pointer-events: none;
}

.header-icon {
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s;
}

.header-icon:hover {
    color: #666;
}

/* Search Bar */
.search-expanded {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: white;
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1001;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 0 15px;
}

/* Menu Slider */
.menu-slider {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: white;
    transition: left 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.menu-slider.open {
    left: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1001;
    display: none;
}

.menu-overlay.active {
    display: block;
}

.menu-profile {
    padding: 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.menu-profile-pic {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.menu-items {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.menu-item i {
    margin-right: 15px;
    width: 20px;
}

/* Main Content */
.main-content {
    margin-top: 50px;
    padding: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 100px;
}

/* Welcome Box */
.welcome-box {
    background: linear-gradient(135deg, #ffd700, #ff6b6b, #ffd700);
    color: black;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.welcome-box h1 {
    font-size: 28px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.welcome-box .favicon {
    width: 28px;
    height: 28px;
}

.welcome-box p {
    font-size: 16px;
    margin-bottom: 20px;
}

.cta-button {
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    color: black;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    color: #666;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Post Styles */
.post {
    background-color: white;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.post-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 12px;
    cursor: pointer;
}

.post-user-info {
    flex: 1;
}

.post-username {
    font-weight: bold;
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.post-username:hover {
    color: #666;
}

.post-time {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.post-options {
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

.post-media {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.post-caption {
    padding: 15px;
    color: #333;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-top: 1px solid #eee;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 15px;
    transition: all 0.3s;
    color: #666;
}

.post-action:hover {
    background-color: #f5f5f5;
    color: #333;
}

.post-action.active {
    color: #ff6b6b;
}

/* Form Styles */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.auth-favicon {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
}

.auth-container h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.auth-container p {
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #ffd700;
}

.auth-button {
    width: 100%;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    color: black;
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.auth-button:hover {
    color: #666;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.auth-switch {
    color: #666;
    text-decoration: none;
    cursor: pointer;
}

.auth-switch:hover {
    color: #333;
}

/* Profile Styles */
.profile-header {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    margin-bottom: 15px;
    object-fit: cover;
}

.profile-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-username {
    color: #666;
    margin-bottom: 15px;
}

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

.profile-stat {
    text-align: center;
}

.profile-stat-number {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.profile-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.profile-button {
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    color: black;
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-button:hover {
    color: #666;
    transform: translateY(-1px);
}

.profile-button.secondary {
    background: #eee;
    color: #333;
}

.profile-button.secondary:hover {
    background: #ddd;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-link {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    color: black;
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    color: black;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s;
    z-index: 999;
}

.fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Footer */
.footer {
    background-color: #ddd;
    padding: 15px;
    text-align: center;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.footer-links a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: #666;
}

.footer-copyright {
    font-size: 12px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 10px;
    }
    
    .welcome-box {
        padding: 20px;
    }
    
    .welcome-box h1 {
        font-size: 24px;
    }
    
    .profile-stats {
        gap: 15px;
    }
    
    .profile-actions {
        flex-wrap: wrap;
    }
    
    .post-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #ffd700;
    background-color: #fafafa;
}

.upload-area.dragover {
    border-color: #ff6b6b;
    background-color: #f8f8f8;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* Trending Page */
.trending-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-button {
    padding: 8px 15px;
    border: 2px solid #eee;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-button.active {
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    color: black;
    border-color: transparent;
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.admin-stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background-color: #e8f5e8;
    color: #2e7d32;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* Username availability */
.username-status {
    font-size: 12px;
    margin-top: 5px;
}

.username-available {
    color: #4caf50;
}

.username-taken {
    color: #f44336;
}

/* Verification badges */
.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 5px;
}

.badge-brown { color: #8d6e63; }
.badge-golden { color: #ffd700; }
.badge-red { color: #f44336; }
.badge-star { color: #ff9800; }

/* Hide scrollbar but keep functionality */
.menu-slider::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Watermark overlay */
.watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.post-media:hover .watermark-overlay,
.post-media:active .watermark-overlay {
    opacity: 1;
}
