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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    color: #00aff0;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-links a:hover {
    background: #f0f0f0;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card.featured {
    border: 3px solid #ffd700;
    position: relative;
}

.post-card.featured::before {
    content: '⭐ ÖZEL';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffd700;
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 12px;
    z-index: 10;
}

.post-header {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-card h3 {
    padding: 0 15px;
    margin-bottom: 10px;
}

.post-card p {
    padding: 0 15px 15px;
    color: #666;
}

.post-media {
    width: 100%;
    position: relative;
}

.post-media img,
.post-media video {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.premium-overlay {
    background: rgba(0,0,0,0.8);
    padding: 40px;
    text-align: center;
    color: #fff;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-actions {
    padding: 15px;
    border-top: 1px solid #eee;
}

.like-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: color 0.3s;
}

.like-btn:hover {
    color: #ff0000;
}

.like-btn.liked {
    color: #ff0000;
}

/* Featured Section */
.featured-section {
    margin-bottom: 40px;
}

.featured-section h2 {
    color: #ffd700;
    margin-bottom: 10px;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed #ddd;
    border-radius: 5px;
}

.form-group small {
    color: #666;
    font-size: 12px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #00aff0;
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.btn-primary:hover {
    background: #0099d6;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.auth-box p {
    text-align: center;
    margin-top: 20px;
}

.auth-box a {
    color: #00aff0;
    text-decoration: none;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

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

.stat-card h3 {
    font-size: 36px;
    color: #00aff0;
    margin-bottom: 10px;
}

.stat-card p {
    color: #666;
}

.admin-table {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.admin-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* Upload Container */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav-links a {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .admin-table {
        overflow-x: auto;
        display: block;
    }
    
    .admin-table table {
        min-width: 800px;
    }
    
    /* Mesajlaşma mobil düzeni */
    .messages-container {
        flex-direction: column;
        height: auto;
        min-height: 70vh;
    }
    
    .conversations-sidebar {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .chat-area {
        min-height: 50vh;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    /* Stats grid mobil */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Auth box mobil */
    .auth-box {
        padding: 30px 20px;
    }
    
    /* Upload container */
    .upload-container {
        padding: 20px;
    }
    
    /* Profile stats mobil */
    .container > div {
        padding: 20px !important;
    }
    
    /* Post card düzenlemeleri */
    .post-card h3 {
        font-size: 16px;
    }
    
    .post-header {
        padding: 12px;
    }
    
    .avatar {
        width: 35px;
        height: 35px;
    }
    
    /* Admin preview küçült */
    .admin-preview {
        width: 50px;
        height: 50px;
    }
    
    /* Modal mobil */
    #userWallModal > div {
        width: 95% !important;
        padding: 20px !important;
        max-height: 90vh !important;
    }
    
    /* Navbar brand mobil */
    .nav-brand h2 {
        font-size: 20px;
    }
    
    /* Container padding */
    .container {
        padding: 15px;
    }
    
    /* Featured badge */
    .post-card.featured::before {
        font-size: 10px;
        padding: 4px 8px;
        top: 8px;
        right: 8px;
    }
    
    /* Message input area mobil */
    .message-input-area {
        flex-direction: column;
        gap: 10px;
    }
    
    .message-input-area textarea {
        width: 100%;
    }
    
    .message-input-area button {
        width: 100%;
    }
    
    /* Conversation item mobil */
    .conversation-item {
        padding: 12px;
    }
    
    .conversation-item .avatar {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    /* Çok küçük ekranlar için */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card h3 {
        font-size: 28px;
    }
    
    .post-media img,
    .post-media video {
        height: 250px;
    }
    
    .nav-links a {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    /* Admin table buttons mobil */
    .admin-table .btn-sm {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }
    
    /* Chat header mobil */
    .chat-header {
        padding: 12px;
    }
    
    .chat-header .avatar {
        width: 35px;
        height: 35px;
    }
    
    .chat-header strong {
        font-size: 14px;
    }
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* Touch friendly buttons */
@media (hover: none) and (pointer: coarse) {
    .btn, button, a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .like-btn {
        padding: 10px 15px;
        font-size: 18px;
    }
    
    .conversation-item {
        min-height: 70px;
    }
}