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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #000000;
    color: #e7e9ea;
    overflow-x: hidden;
}

/* Auth Section */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #000000;
}

.auth-box {
    background: #16181c;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.03);
    width: 100%;
    max-width: 400px;
    border: 1px solid #2f3336;
}

.auth-box h1 {
    text-align: center;
    color: #1d9bf0;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: bold;
}

.auth-box h2 {
    margin-bottom: 20px;
    color: #e7e9ea;
    font-size: 1.5em;
}

.auth-box input {
    width: 100%;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #2f3336;
    border-radius: 4px;
    font-size: 15px;
    background: #000;
    color: #e7e9ea;
    transition: border-color 0.2s;
}

.auth-box input:focus {
    outline: none;
    border-color: #1d9bf0;
}

.auth-box button {
    width: 100%;
    padding: 12px;
    background-color: #1d9bf0;
    color: white;
    border: none;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.auth-box button:hover {
    background-color: #1a8cd8;
}

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

.auth-box a {
    color: #1d9bf0;
    text-decoration: none;
}

.auth-box a:hover {
    text-decoration: underline;
}

/* Google Sign-in Button */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: white !important;
    color: #0f1419 !important;
    border: 1px solid #536471 !important;
    font-weight: 500;
    margin-bottom: 20px;
}

.google-btn:hover {
    background-color: #e7e9ea !important;
}

.google-btn svg {
    flex-shrink: 0;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #2f3336;
}

.divider span {
    padding: 0 16px;
    color: #71767b;
    font-size: 15px;
}

/* Twitter Layout */
.twitter-layout {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    max-width: 1280px;
    margin: 0 auto;
}

/* Left Sidebar */
.sidebar-left {
    width: 275px;
    padding: 0 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid #2f3336;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 0;
}

.logo {
    padding: 12px;
    margin-bottom: 4px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.logo:hover {
    background-color: rgba(29, 155, 240, 0.1);
}

.logo svg {
    color: #1d9bf0;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 16px;
    border-radius: 9999px;
    text-decoration: none;
    color: #e7e9ea;
    font-size: 20px;
    font-weight: 400;
    transition: background-color 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background-color: rgba(231, 233, 234, 0.1);
}

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

.nav-item span {
    font-size: 20px;
}

/* Post Button */
.post-button {
    background-color: #1d9bf0;
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 16px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin: 16px 0;
}

.post-button:hover {
    background-color: #1a8cd8;
}

/* User Menu */
.user-menu {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-menu:hover {
    background-color: rgba(231, 233, 234, 0.1);
}

.user-info-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.composer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.profile-avatar {
    width: 133px;
    height: 133px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 4px solid #000;
    margin-top: -67px;
    margin-left: 16px;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 700;
    font-size: 15px;
    color: #e7e9ea;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-handle {
    font-size: 15px;
    color: #71767b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    background: none;
    border: none;
    color: #e7e9ea;
    cursor: pointer;
    padding: 8px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: rgba(239, 243, 244, 0.1);
}

/* Main Feed */
.main-feed {
    width: 600px;
    border-right: 1px solid #2f3336;
    min-height: 100vh;
}

.feed-header {
    position: sticky;
    top: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 10;
    border-bottom: 1px solid #2f3336;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 53px;
}

.feed-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #e7e9ea;
}

.back-button {
    background: none;
    border: none;
    color: #e7e9ea;
    cursor: pointer;
    padding: 8px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    margin-left: -8px;
}

.back-button:hover {
    background-color: rgba(239, 243, 244, 0.1);
}

.feed-view {
    min-height: calc(100vh - 53px);
}

/* Welcome Message */
.welcome-message {
    padding: 40px 32px;
    text-align: center;
}

.welcome-message h1 {
    font-size: 31px;
    font-weight: 800;
    color: #e7e9ea;
    margin-bottom: 8px;
}

.welcome-message p {
    font-size: 15px;
    color: #71767b;
}

/* Post Composer */
.post-composer {
    padding: 16px;
    border-bottom: 1px solid #2f3336;
    display: flex;
    gap: 12px;
}

.composer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.composer-content textarea {
    background: transparent;
    border: none;
    color: #e7e9ea;
    font-size: 20px;
    font-family: inherit;
    resize: none;
    min-height: 120px;
    padding: 12px 0;
    outline: none;
}

.composer-content textarea::placeholder {
    color: #71767b;
}

.composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #2f3336;
}

.composer-icons {
    display: flex;
    gap: 4px;
}

.composer-icons button {
    background: none;
    border: none;
    color: #1d9bf0;
    cursor: pointer;
    padding: 8px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.composer-icons button:hover {
    background-color: rgba(29, 155, 240, 0.1);
}

.post-btn {
    background-color: #1d9bf0;
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 8px 24px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 80px;
}

.post-btn:hover {
    background-color: #1a8cd8;
}

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

/* Posts */
.post {
    padding: 16px;
    border-bottom: 1px solid #2f3336;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    gap: 12px;
}

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

.post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.post-author {
    font-weight: 700;
    font-size: 15px;
    color: #e7e9ea;
}

.post-handle {
    font-size: 15px;
    color: #71767b;
}

.post-date {
    font-size: 15px;
    color: #71767b;
}

.post-date::before {
    content: '·';
    margin: 0 4px;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    color: #e7e9ea;
    margin-bottom: 8px;
}

.post-content {
    font-size: 15px;
    color: #e7e9ea;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-meta {
    color: #71767b;
    font-size: 15px;
    margin-top: 12px;
}

.post-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 12px;
    border: 1px solid #2f3336;
}

.mention {
    color: #1d9bf0;
    cursor: pointer;
    text-decoration: none;
}

.mention:hover {
    text-decoration: underline;
}

/* Comments */
.comment {
    padding: 16px;
    border-bottom: 1px solid #2f3336;
    display: flex;
    gap: 12px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 700;
    font-size: 15px;
    color: #e7e9ea;
}

.comment-date {
    font-size: 15px;
    color: #71767b;
}

.comment-date::before {
    content: '·';
    margin: 0 4px;
}

.comment-content {
    font-size: 15px;
    color: #e7e9ea;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Profile */
.profile-content {
    padding-bottom: 16px;
}

.profile-banner {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-info {
    padding: 0 16px;
}

#user-info {
    margin-top: 16px;
    padding: 16px 0;
}

#user-info h2 {
    font-size: 20px;
    font-weight: 800;
    color: #e7e9ea;
    margin-bottom: 4px;
}

#user-info p {
    font-size: 15px;
    color: #71767b;
    margin-bottom: 12px;
}

/* Right Sidebar */
.sidebar-right {
    width: 350px;
    padding: 0 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.search-box {
    position: sticky;
    top: 0;
    background-color: #000;
    padding: 8px 0 16px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #202327;
    border-radius: 9999px;
    padding: 12px 16px;
    margin: 8px 0 16px;
}

.search-box svg {
    color: #71767b;
    flex-shrink: 0;
}

.search-box input {
    background: transparent;
    border: none;
    color: #e7e9ea;
    font-size: 15px;
    width: 100%;
    outline: none;
}

.search-box input::placeholder {
    color: #71767b;
}

/* Widget */
.widget {
    background-color: #16181c;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.widget h3 {
    padding: 16px;
    font-size: 20px;
    font-weight: 800;
    color: #e7e9ea;
}

.widget-content {
    padding: 16px;
    color: #71767b;
    font-size: 15px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1280px) {
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 1000px) {
    .sidebar-left {
        width: 88px;
    }

    .nav-item span {
        display: none;
    }

    .user-details {
        display: none;
    }

    .post-button {
        width: 50px;
        height: 50px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .post-button::after {
        content: '+';
        font-size: 24px;
    }

    .post-button {
        font-size: 0;
    }
}

@media (max-width: 700px) {
    .sidebar-left {
        width: 70px;
        padding: 0 4px;
    }

    .main-feed {
        width: 100%;
        border-right: none;
    }

    .logo {
        margin: 0 auto;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #71767b;
}

/* Error Message */
.error {
    color: #f4212e;
    background-color: rgba(244, 33, 46, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px;
    font-size: 15px;
}

.success {
    color: #00ba7c;
    background-color: rgba(0, 186, 124, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px;
    font-size: 15px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #2f3336;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3e4144;
}
