/* Kampüs Sosyal - Ana CSS Dosyası */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1DA1F2;
    --secondary-color: #14171A;
    --bg-color: #F5F8FA;
    --text-color: #14171A;
    --border-color: #E1E8ED;
    --hover-bg: #F7F9FA;
    --success-color: #1ABC9C;
    --danger-color: #E74C3C;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.auth-box p {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: var(--bg-color);
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
}

.auth-tab.active {
    background: var(--primary-color);
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.auth-form select {
    cursor: pointer;
}

/* App Container */
.app-container {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    grid-template-areas: "sidebar main right";
    min-height: 100vh;
    gap: 0;
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background: #2C3E50;
    color: white;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar .nav-item {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar .nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar .nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.sidebar .user-info {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar .user-username {
    color: rgba(255, 255, 255, 0.7);
}

.sidebar .logo h1 {
    color: white;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.nav-item:hover {
    background: var(--hover-bg);
}

.nav-item.active {
    background: var(--hover-bg);
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
}

.user-username {
    font-size: 0.875rem;
    color: #666;
}

/* Page Content System */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* Main Content */
.main-content {
    grid-area: main;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--bg-color);
}

.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Post Form */
.post-form-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-form textarea {
    width: 100%;
    border: none;
    resize: none;
    font-size: 1.125rem;
    font-family: inherit;
    margin-bottom: 1rem;
    outline: none;
}

.post-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-upload-btn {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: var(--hover-bg);
    display: inline-block;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 200px;
}

.timeline .loading {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1rem;
}

.post-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-user-info {
    flex: 1;
}

.post-username {
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color);
}

.post-username:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 0.875rem;
    color: #666;
}

.post-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-media {
    margin-bottom: 1rem;
}

.post-media img {
    width: 100%;
    border-radius: 8px;
    max-height: 500px;
    object-fit: cover;
}

.post-actions {
    display: flex;
    gap: 2rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.post-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.post-action:hover {
    background: var(--hover-bg);
}

.post-action.liked {
    color: var(--danger-color);
}

.post-action.reposted {
    color: var(--success-color);
}

/* Right Sidebar */
.right-sidebar {
    grid-area: right;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-color);
}

.widget {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.widget h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    color: var(--text-color);
}

#suggestions-list {
    color: #666;
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #1a91da;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Messages Page */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 15px;
}

.message-item:hover {
    background: var(--hover-bg);
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.message-info {
    flex: 1;
}

.message-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.message-preview {
    color: #666;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-unread {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Conversation View */
.conversation-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
}

.btn-back {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary-color);
}

.conversation-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.conversation-name {
    font-weight: 600;
}

.conversation-username {
    color: #666;
    font-size: 0.9rem;
}

.messages-container {
    height: calc(100vh - 250px);
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-color);
}

.message {
    max-width: 70%;
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 12px;
}

.message-own {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    text-align: right;
}

.message-other {
    background: white;
    margin-right: auto;
}

.message-content {
    margin-bottom: 5px;
}

.message-time {
    font-size: 0.8rem;
    opacity: 0.7;
}

.message-status {
    font-size: 0.8rem;
    margin-top: 5px;
}

.message-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid var(--border-color);
}

.message-form {
    display: flex;
    gap: 10px;
}

.message-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: none;
    min-height: 50px;
}

/* Profile Page */
.profile-header {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.profile-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--primary-color);
}

.profile-avatar-container {
    position: relative;
    margin-top: -75px;
    padding: 0 20px;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
}

.profile-info {
    padding: 20px;
}

.profile-info h2 {
    margin-bottom: 5px;
}

.profile-info p {
    color: #666;
    margin-bottom: 10px;
}

.profile-bio {
    margin: 15px 0;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.profile-stats span {
    font-weight: 600;
}

.follow-btn {
    margin-top: 15px;
}

.profile-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Search Page */
.search-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.search-container h2 {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.search-results {
    margin-top: 20px;
}

.search-section {
    margin-bottom: 30px;
}

.search-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.search-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    gap: 15px;
    transition: background 0.2s;
}

.search-item:hover {
    background: var(--hover-bg);
}

.search-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--primary-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 250px 1fr;
        grid-template-areas: "sidebar main";
    }
    
    .right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .app-container {
        grid-template-columns: 1fr;
        grid-template-areas: "main";
        padding-top: 60px;
    }
    
    .right-sidebar {
        display: none;
    }
    
    .sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 280px;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.open {
        left: 0;
    }

    .mobile-overlay {
        display: block;
    }
    
    .main-content {
        width: 100%;
        padding: 1rem;
        margin-top: 0;
    }

    .tab-navigation {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .post-form-container {
        margin-bottom: 1rem;
    }

    .post-form textarea {
        font-size: 16px; /* iOS zoom önleme */
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-avatar-container {
        margin-top: -50px;
    }

    .messages-container {
        height: calc(100vh - 200px);
    }

    .message {
        max-width: 85%;
    }

    .search-form {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mobile-menu-btn {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }

    .sidebar {
        width: 260px;
    }

    .main-content {
        padding: 0.75rem;
    }

    .post-card {
        padding: 1rem;
    }

    .profile-stats {
        flex-direction: column;
        gap: 10px;
    }

    .profile-stats span {
        display: block;
    }
}

