/* ==========================================================================
   Kütahya İtiraf - Twitter (X) Enterprise Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-primary: #000000;
    --bg-secondary: #16181c;
    --bg-tertiary: #202327;
    --bg-hover: rgba(239, 243, 244, 0.1);
    
    --border-color: #2f3336;
    --border-light: #22262a;

    --text-primary: #f7f9f9;
    --text-secondary: #71767b;
    --text-muted: #536471;

    --accent-color: #1d9bf0;
    --accent-hover: #1a8cd8;
    --accent-light: rgba(29, 155, 240, 0.1);
    
    --pinned-accent: #f7b928;
    --pinned-bg: rgba(247, 185, 40, 0.06);
    --pinned-border: rgba(247, 185, 40, 0.3);

    --danger-color: #f4212e;
    --danger-light: rgba(244, 33, 46, 0.1);
    
    --success-color: #00ba7c;
    --warning-color: #ffad1f;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --radius-sm: 4px;
    --radius-md: 12px;
    --radius-full: 9999px;

    --header-height: 53px;
    --sidebar-left-width: 275px;
    --sidebar-right-width: 350px;
    --feed-width: 600px;
}

/* Base Resets */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Main Layout Grid */
.app-container {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    max-width: 1265px;
    margin: 0 auto;
}

/* Left Sidebar Navigation */
.sidebar-left {
    width: var(--sidebar-left-width);
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    border-right: 1px solid var(--border-color);
    z-index: 100;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.25rem;
    transition: background-color 0.2s ease;
}

.brand-logo:hover {
    background-color: var(--bg-hover);
    text-decoration: none;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
}

.brand-badge {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.nav-item:hover {
    background-color: var(--bg-hover);
    text-decoration: none;
}

.nav-item.active {
    font-weight: 700;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.btn-tweet-large {
    margin-top: 16px;
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-tweet-large:hover {
    background-color: var(--accent-hover);
}

.sidebar-user-footer {
    margin-top: auto;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-color);
}

.user-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333639;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-info-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.user-info-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Main Timeline Feed */
.main-feed {
    width: var(--feed-width);
    min-height: 100vh;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
}

.top-sticky-header {
    position: sticky;
    top: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 90;
}

.top-header-title {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-size: 1.2rem;
    font-weight: 700;
}

.feed-tabs {
    display: flex;
    border-top: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    text-align: center;
    padding: 14px 0;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tab-button:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--text-primary);
    font-weight: 700;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 65px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: var(--radius-full);
}

/* Tweet Composer */
.tweet-composer {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.composer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #26292d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent-color);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.composer-body {
    flex: 1;
}

.composer-textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1.1rem;
    resize: none;
    min-height: 80px;
    line-height: 1.45;
}

.composer-textarea::placeholder {
    color: var(--text-secondary);
}

.hashtag-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.chip-tag {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-tag:hover {
    background-color: var(--accent-light);
    border-color: var(--accent-color);
}

.composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.composer-icons {
    display: flex;
    gap: 12px;
    color: var(--accent-color);
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.icon-btn:hover {
    background-color: var(--accent-light);
}

.composer-right-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.char-counter {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.char-counter.warning {
    color: var(--warning-color);
    font-weight: 700;
}

.char-counter.exceeded {
    color: var(--danger-color);
    font-weight: 700;
}

.btn-submit-confession {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-submit-confession:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit-confession:hover:not(:disabled) {
    background-color: var(--accent-hover);
}

/* Pinned Post: Haftanın İtirafı */
.pinned-post-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px 0 68px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.pinned-post-header svg {
    width: 14px;
    height: 14px;
    fill: var(--pinned-accent);
}

/* Confession Card */
.confession-card {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    position: relative;
}

.confession-card:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.card-content-wrap {
    flex: 1;
}

.card-header-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 700;
    color: var(--text-primary);
}

.verified-icon {
    width: 16px;
    height: 16px;
    fill: var(--accent-color);
}

.user-handle {
    color: var(--text-secondary);
    margin-left: 2px;
}

.post-dot {
    color: var(--text-secondary);
}

.post-time {
    color: var(--text-secondary);
}

.card-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: pre-line;
    word-break: break-word;
    margin-bottom: 10px;
    line-height: 1.45;
}

.card-text .hashtag-link {
    color: var(--accent-color);
}

.card-text .hashtag-link:hover {
    text-decoration: underline;
}

/* Card Actions Bar */
.card-actions-bar {
    display: flex;
    justify-content: space-between;
    max-width: 420px;
    margin-top: 8px;
    color: var(--text-secondary);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 6px 8px;
    border-radius: var(--radius-full);
}

.action-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.action-btn:hover {
    background-color: var(--accent-light);
    color: var(--accent-color);
}

.action-btn.like:hover {
    color: #f91880;
    background-color: rgba(249, 24, 128, 0.1);
}

.action-btn.like.liked {
    color: #f91880;
}

.action-btn.like.liked svg {
    fill: #f91880;
}

/* Right Sidebar Section */
.sidebar-right {
    width: var(--sidebar-right-width);
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.search-box-wrap {
    position: sticky;
    top: 0;
    background-color: var(--bg-primary);
    padding-top: 4px;
    padding-bottom: 8px;
    z-index: 10;
}

.search-input-group {
    background-color: var(--bg-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.search-input-group:focus-within {
    border-color: var(--accent-color);
    background-color: var(--bg-primary);
}

.search-input-group input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-size: 0.95rem;
}

.widget-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.widget-title {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trend-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    display: block;
}

.trend-item:last-child {
    border-bottom: none;
}

.trend-item:hover {
    text-decoration: none;
}

.trend-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.trend-tag {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.trend-posts-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Footer / Legal Links Bar */
.sidebar-legal-links {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 0 4px;
}

.sidebar-legal-links a {
    color: var(--text-muted);
    margin-right: 8px;
}

.sidebar-legal-links a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* Modals System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(91, 112, 131, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    padding: 24px;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.modal-title {
    font-weight: 800;
    font-size: 1.2rem;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-modal:hover {
    background-color: var(--bg-hover);
}

.legal-body {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.legal-body h3 {
    font-size: 0.95rem;
    margin-top: 16px;
    margin-bottom: 6px;
    color: var(--accent-color);
}

.legal-body p {
    margin-bottom: 10px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 53px;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    z-index: 99;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-btn {
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
}

.mobile-nav-btn.active {
    color: var(--text-primary);
}

.mobile-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .sidebar-right {
        display: none;
    }
    .sidebar-left {
        width: 80px;
        align-items: center;
        padding: 0 4px;
    }
    .brand-title, .nav-text, .user-info-text, .btn-tweet-text {
        display: none;
    }
    .btn-tweet-large {
        width: 50px;
        height: 50px;
        padding: 0;
        border-radius: 50%;
    }
}

@media (max-width: 680px) {
    .sidebar-left {
        display: none;
    }
    .main-feed {
        width: 100%;
        border-right: none;
        padding-bottom: 60px;
    }
    .mobile-bottom-nav {
        display: flex;
    }
}
