* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-primary: #F5F7FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --accent-blue: #0095F6;
    --accent-blue-hover: #1877F2;
    --accent-cyan: #00D9FF;
    --accent-orange: #FF9F43;
    --accent-green: #00C853;
    --accent-pink: #FF6B9D;
    --text-primary: #1C1F26;
    --text-secondary: #5B6370;
    --text-muted: #8F9BB3;
    --border-color: #E4E9F2;
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #1A1A1A;
    --bg-card: #262626;
    --accent-blue: #0095F6;
    --accent-blue-hover: #1877F2;
    --accent-cyan: #00D9FF;
    --accent-orange: #FF9F43;
    --accent-green: #00C853;
    --accent-pink: #FF6B9D;
    --text-primary: #FAFAFA;
    --text-secondary: #A8A8A8;
    --text-muted: #737373;
    --border-color: #363636;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.app-container {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-primary);
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    margin: 0 -20px;
    padding: 0 20px 5px;
}

.header-wrapper {
    width: 100%;
}

.header-container {
    width: 100%;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.burger-menu {
    display: none;
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: none;
    border-radius: 10px;
    font-size: 18px;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    font-family: 'Pacifico', cursive;
}

.header-logo i {
    display: none;
}

.header-spacer {
    flex: 1;
}

.header-search {
    position: relative;
    max-width: 280px;
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
}

.header-search input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 13px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
    min-width: 180px;
}

.header-search input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-secondary);
}

.header-nav {
    display: flex;
    gap: 4px;
}

.header-nav-item {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 16px;
    background: var(--bg-primary);
}

.header-nav-item:active {
    transform: scale(0.95);
}

.header-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background: var(--accent-pink);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-primary);
}

.header-profile img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.header-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Content Wrapper - Grid Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr 320px;
    gap: 20px;
    width: 100%;
    align-items: start;
}

/* Left Sidebar */
.left-sidebar {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    position: sticky;
    top: 112px;
    height: fit-content;
    max-height: calc(100vh - 132px);
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.left-sidebar::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.left-sidebar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar-nav {
    padding: 12px 0;
}

.sidebar-section-title {
    padding: 12px 16px 8px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    font-size: 13px;
    font-weight: 600;
}

.nav-item:active {
    transform: scale(0.98);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(108, 92, 231, 0.1), transparent);
    color: var(--accent-blue);
    border-left: 3px solid var(--accent-blue);
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 15px;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--accent-pink);
    color: #fff;
    padding: 2px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.theme-toggle i {
    margin-right: 10px;
    font-size: 15px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-switch.active {
    background: var(--accent-blue);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

.logout-btn {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--accent-pink);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 13px;
}

.logout-btn:active {
    background: rgba(255, 107, 157, 0.1);
}

.logout-btn i {
    margin-right: 10px;
}

/* Main Content */
.main-content {
    width: 100%;
    padding: 0;
    padding-bottom: 20px;
    min-width: 0;
}

/* Profile Header */
.profile-header {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.profile-top {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.2);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-name-section {
    margin-bottom: 12px;
}

.profile-info h1 {
    font-size: 16px;
    margin-bottom: 2px;
    color: var(--text-primary);
    font-weight: 700;
}

.username {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.profile-stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat strong {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 700;
}

.stat span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    white-space: nowrap;
}

.bio {
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.profile-actions {
    display: flex;
    gap: 8px;
}

.btn-subscribe, .btn-ask-question {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-subscribe {
    background: var(--accent-blue);
    color: #fff;
}

.btn-ask-question {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-subscribe:active, .btn-ask-question:active {
    transform: scale(0.98);
}

/* Toggle */
.content-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    background: var(--bg-primary);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.toggle-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-btn.active {
    background: var(--bg-secondary);
    color: var(--accent-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08),
                0 1px 2px rgba(0, 0, 0, 0.06);
}

.toggle-btn i {
    margin-right: 6px;
    font-size: 13px;
}

.toggle-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* Questions List */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-item {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
    overflow: hidden;
}

.question-item:active {
    transform: scale(0.99);
}

.question-item.unanswered {
    border-left: 3px solid var(--accent-orange);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.anonymous {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.anonymous i {
    margin-right: 6px;
}

.time {
    font-size: 11px;
    color: var(--text-muted);
}

.question-text {
    font-size: 14px;
    color: var(--text-primary);
    padding: 0 16px 16px 16px;
    line-height: 1.6;
}

.post-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

.post-description {
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.post-description strong {
    font-weight: 700;
    margin-right: 4px;
}

/* Answer thread style */
.answer-thread {
    padding: 0 16px 16px 16px;
    position: relative;
}

.answer-thread::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 40px;
    bottom: 16px;
    width: 2px;
    background: var(--border-color);
}

.answer {
    position: relative;
    padding-left: 48px;
    margin-bottom: 12px;
}

.answer-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.answer-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    left: 0;
}

.answer-author strong {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 700;
}

.answer-text {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}

.post-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.post-stats {
    padding: 0 16px 12px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.answer-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.action-btn i {
    font-size: 22px;
}

.action-btn:active {
    transform: scale(0.95);
}

.action-btn.active {
    color: var(--accent-pink);
}

.action-btn.liked {
    color: var(--accent-pink);
}

.action-btn.liked i {
    color: var(--accent-pink);
}

.action-btn.saved i {
    color: var(--text-primary);
}

.action-share {
    margin-left: auto;
}

.btn-answer {
    margin: 0 16px 16px;
    background: var(--accent-orange);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    display: block;
    width: calc(100% - 32px);
}

.btn-answer:active {
    transform: scale(0.98);
}

.btn-answer i {
    margin-right: 5px;
    font-size: 13px;
}

.question-item.unanswered .question-text {
    margin-bottom: 16px;
}

.post-stats {
    display: none;
}

/* Right Sidebar */
.right-sidebar {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    position: sticky;
    top: 112px;
    height: fit-content;
    max-height: calc(100vh - 132px);
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.right-sidebar::-webkit-scrollbar {
    width: 4px;
}

.right-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.right-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.widget {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.widget h3 i {
    color: var(--accent-blue);
    margin-right: 6px;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-item img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

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

.user-info strong {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.user-info span {
    font-size: 11px;
    color: var(--accent-blue);
}

.btn-follow {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-follow:active {
    transform: scale(0.95);
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: var(--bg-secondary);
    color: var(--accent-blue);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    border: 1px solid var(--accent-blue);
    transition: all 0.2s;
    font-weight: 600;
}

.tag:active {
    background: var(--accent-blue);
    color: #fff;
}

.stats-widget {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.stat-row span {
    font-size: 11px;
    color: var(--text-secondary);
}

.stat-row strong {
    font-size: 14px;
    color: var(--accent-blue);
    font-weight: 800;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-primary);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--bg-primary);
    margin-bottom: 12px;
}

.modal-form textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-secondary);
}

.form-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.form-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-option label {
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.file-upload:hover {
    border-color: var(--accent-blue);
    background: var(--bg-primary);
}

.file-upload i {
    color: var(--accent-blue);
    font-size: 16px;
}

.file-upload span {
    font-size: 13px;
    color: var(--text-secondary);
}

.file-upload input[type="file"] {
    display: none;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-submit {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-submit i {
    margin-right: 5px;
    font-size: 13px;
}

/* Footer - Desktop */
.main-footer {
    background: var(--bg-secondary);
    padding: 32px 16px;
    margin-top: 32px;
    border-radius: 16px 16px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-section h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.social-links {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.social-link {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.social-link:active {
    background: var(--accent-blue);
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 11px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 8px 8px 8px;
    z-index: 98;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

.mobile-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    border-radius: 10px;
    min-width: 56px;
}

.mobile-nav-item.active {
    color: var(--accent-blue);
}

.mobile-nav-item i {
    font-size: 18px;
    transition: all 0.2s;
}

.mobile-nav-item span {
    font-size: 10px;
    font-weight: 600;
}

.mobile-nav-badge {
    position: absolute;
    top: 3px;
    right: 6px;
    background: var(--accent-pink);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 8px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-add-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-blue);
    border: none;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 4px;
}

.mobile-add-btn:active {
    transform: scale(0.95);
}

/* Mobile Sheet */
.mobile-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-sheet.active {
    display: block;
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 0 auto 20px;
}

/* Responsive */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 260px 1fr;
    }

    .right-sidebar {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .app-container {
        padding: 16px;
        gap: 5px;
    }

    .main-header {
        margin: 0 -16px;
        padding: 0 16px 16px;
    }

    .content-wrapper {
        grid-template-columns: 220px 1fr;
        gap: 16px;
    }

    .left-sidebar {
        top: 60px;
        height: calc(100vh - 60px);
        max-height: calc(100vh - 60px);
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--border-color);
        box-shadow: none;
    }

    .main-content {
        padding: 0 8px;
    }

    .profile-header {
        padding: 18px;
    }

    .profile-avatar img {
        width: 70px;
        height: 70px;
    }

    .profile-info h1 {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 0;
        gap: 0;
    }

    .main-header {
        margin: 0;
        padding: 0;
        z-index: 101;
    }

    .header-wrapper {
        padding: 0;
    }

    .header-container {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
        padding: 8px 12px;
    }

    .burger-menu {
        display: flex;
        font-size: 22px;
    }

    .header-logo {
        font-size: 22px;
    }

    .header-logo i {
        display: inline;
        font-size: 24px;
    }

    .header-search {
        display: none;
    }

    .header-profile {
        display: none;
    }

    .header-spacer {
        display: none;
    }

    .header-nav {
        margin-left: auto;
        gap: 8px;
    }

    .header-nav-item {
        font-size: 22px;
        width: 40px;
        height: 40px;
    }

    .header-nav-item:not(.header-nav-notification):not(.header-nav-messages) {
        display: none;
    }

    .overlay {
        top: 52px;
        z-index: 99;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .main-header {
        z-index: 101;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
    }

    .left-sidebar {
        position: fixed;
        top: 52px;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
        width: 280px;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--border-color);
        height: auto;
        max-height: none;
        z-index: 100;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .left-sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        padding: 12px;
        padding-bottom: 80px;
    }

    .profile-header {
        padding: 16px;
    }

    .profile-top {
        gap: 12px;
        margin-bottom: 12px;
    }

    .profile-avatar img {
        width: 70px;
        height: 70px;
    }

    .profile-info h1 {
        font-size: 16px;
    }

    .username {
        font-size: 12px;
    }

    .bio {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .profile-stats {
        gap: 16px;
        justify-content: flex-start;
    }

    .stat {
        flex-direction: column;
        align-items: center;
    }

    .stat strong {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .stat span {
        font-size: 11px;
    }

    .btn-subscribe, .btn-ask-question {
        font-size: 12px;
        padding: 8px 12px;
    }

    .profile-actions {
        display: flex;
    }

    .main-footer {
        display: none;
    }

    .mobile-bottom-nav {
        display: block;
    }

    .modal {
        z-index: 200;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .modal-content {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 80vh;
        margin: 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modal.active {
        align-items: flex-end;
        padding: 0;
    }

    .modal.active .modal-content {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .left-sidebar {
        width: 260px;
    }
}
