:root {
    --primary: #1d9bf0;
    --primary-hover: #1a8cd8;
    --black: #000000;
    --dark-gray: #16181c;
    --light-gray: #71767b;
    --border: #2f3336;
    --text-main: #e7e9ea;
    --text-secondary: #71767b;
    --danger: #f4212e;
}

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

body {
    background-color: var(--black);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

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

a:hover {
    text-decoration: underline;
}

/* Landing Page */
.main-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.landing-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.landing-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-logo {
    width: 300px;
    height: 300px;
    fill: white;
}

.landing-right {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 45vw;
}

.landing-content {
    max-width: 600px;
    width: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-title {
    font-size: 64px;
    font-weight: 900;
    margin-bottom: 40px;
    line-height: 1.2;
}

.landing-subtitle {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 30px;
}

.auth-buttons {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: white;
    color: black;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.2s;
}

.social-btn:hover {
    background-color: #e6e6e6;
}

.social-icon {
    width: 20px;
    height: 20px;
}

.apple-btn {
    font-weight: bold;
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
    color: var(--text-main);
}

.line {
    flex: 1;
    height: 1px;
    background-color: var(--border);
}

.create-account-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
}

.create-account-btn:hover {
    background-color: var(--primary-hover);
    text-decoration: none;
}

.terms-text {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.4;
}

.terms-text a {
    color: var(--primary);
}

.signin-prompt {
    margin-top: 60px;
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 12px;
}

.signin-btn {
    color: #eff3f4;
    border: 1px solid #536471;
    background: transparent;
    padding: 10px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
}

.signin-btn:hover {
    background-color: rgba(239, 243, 244, 0.1);
    text-decoration: none;
}

.landing-footer {
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    font-size: 11px;
    color: var(--text-secondary);
    background-color: black;
    width: 100%;
    z-index: 10;
}

.landing-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.landing-footer span {
    white-space: nowrap;
}

.landing-footer a:hover {
    text-decoration: underline;
}

/* Auth Forms (Login/Signup) */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center; /* Center vertically */
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background-color: black;
    width: 100%;
    max-width: 600px;
    padding: 30px;
    border-radius: 16px;
    position: relative;
    /* Removed border to match cleaner look, or make it subtle */
}

.auth-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    margin-right: 20px;
}

.auth-logo {
    width: 30px;
    height: 30px;
    fill: white;
    margin: 0 auto;
}

.auth-title {
    font-size: 31px;
    font-weight: bold;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-input {
    width: 100%;
    height: 56px;
    padding: 24px 12px 8px;
    background-color: black;
    border: 1px solid var(--border);
    color: white;
    font-size: 17px;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.floating-label {
    position: absolute;
    left: 12px;
    top: 18px;
    color: #71767b;
    font-size: 17px;
    pointer-events: none;
    transition: all 0.2s;
}

.form-input:focus + .floating-label,
.form-input:not(:placeholder-shown) + .floating-label {
    top: 6px;
    font-size: 13px;
    color: var(--primary);
}

.next-btn, .submit-btn {
    width: 100%;
    background-color: white;
    color: black;
    border: none;
    padding: 12px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.next-btn:hover, .submit-btn:hover {
    background-color: #e6e6e6;
}

/* Select Styling for Date of Birth */
.date-selectors {
    display: flex;
    gap: 10px;
}

.date-select {
    flex: 1;
    background-color: black;
    color: white;
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="white" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
}

/* Modal Overlay Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(91, 112, 131, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: black;
    width: 100%;
    max-width: 600px;
    height: auto;
    max-height: 90vh;
    border-radius: 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 53px;
    position: sticky;
    top: 0;
    background-color: black;
    z-index: 10;
}

.modal-logo {
    flex: 1;
    display: flex;
    justify-content: center;
}

.auth-content {
    padding: 0 80px 48px 80px;
    flex: 1;
}

/* App Structure (Home/Feed) */
.container {
    display: flex;
    max-width: 1300px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 275px;
    padding: 0 20px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    width: 30px;
    height: 30px;
    fill: white;
    margin: 15px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-size: 20px;
    margin-bottom: 8px;
    transition: background-color 0.2s;
}

.nav-item:hover {
    background-color: rgba(239, 243, 244, 0.1);
    text-decoration: none;
}

.nav-icon {
    width: 26px;
    height: 26px;
    fill: white;
}

.tweet-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 17px;
    cursor: pointer;
    width: 90%;
    margin-top: 20px;
    transition: background-color 0.2s;
}

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

.user-profile-link {
    margin-top: auto;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 30px;
    cursor: pointer;
}

.user-profile-link:hover {
    background-color: rgba(239, 243, 244, 0.1);
}

/* Main Feed */
.main-content {
    flex: 1;
    border-right: 1px solid var(--border);
    max-width: 600px;
}

.header {
    padding: 15px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background-color: rgba(0, 0, 0, 0.65);
    position: sticky;
    top: 0;
    z-index: 10;
}

.tweet-form {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    flex-shrink: 0;
}

.form-content {
    flex: 1;
}

.tweet-input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    resize: none;
    outline: none;
    margin-bottom: 10px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.tweet-btn-small {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}

/* Tweets */
.tweet {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.tweet-content {
    flex: 1;
}

.tweet-header {
    margin-bottom: 4px;
}

.tweet-name {
    font-weight: bold;
    color: white;
}

.tweet-username, .tweet-time {
    color: var(--text-secondary);
    margin-left: 4px;
}

.tweet-text {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.tweet-actions {
    display: flex;
    justify-content: space-between;
    max-width: 425px;
    color: var(--text-secondary);
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: color 0.2s;
}

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

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

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

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

/* Responsive */
@media (max-width: 1000px) {
    .landing-left {
        display: none;
    }
    
    .landing-container {
        flex-direction: column;
        justify-content: center;
    }
    
    .landing-right {
        align-items: center;
        text-align: center;
        padding: 10px;
        width: 100%;
    }
    
    .landing-content {
        align-items: center;
    }
    
    .landing-logo {
        display: block;
        width: 40px;
        height: 40px;
        margin-bottom: 15px;
    }
    
    .landing-title {
        font-size: 36px;
        margin-bottom: 20px;
    }
    
    .landing-subtitle {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .auth-buttons {
        width: 100%;
        max-width: 300px;
    }
    
    .landing-footer {
        padding-top: 5px;
        gap: 6px;
        font-size: 10px;
    }

    .sidebar {
        width: 80px;
        align-items: center;
    }

    .nav-item span, .tweet-btn {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .landing-title {
        font-size: 32px;
    }
    
    .auth-box {
        padding: 20px;
    }
}

/* Download Page */
.download-container {
    min-height: 100vh;
    background-color: black;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.download-content {
    max-width: 800px;
    width: 100%;
    padding: 60px 20px;
    text-align: center;
}

.download-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 40px;
}

.app-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.app-store-btn {
    background-color: black;
    border: 1px solid #536471;
    border-radius: 8px;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    width: 200px;
    justify-content: center;
}

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

.app-store-btn svg {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    fill: white;
}

.download-features {
    text-align: left;
    margin-top: 40px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.download-features ul {
    list-style-type: disc;
    padding-left: 20px;
}

.download-features li {
    margin-bottom: 10px;
}

/* Help Center */
.help-container {
    min-height: 100vh;
    background-color: black;
    color: white;
    display: flex;
    flex-direction: column;
}

.help-hero {
    background-color: #15202b;
    padding: 60px 20px;
    text-align: center;
}

.help-search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.help-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border-radius: 9999px;
    border: none;
    font-size: 16px;
    background-color: white;
    color: black;
}

.help-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    fill: var(--text-secondary);
    width: 20px;
    height: 20px;
}

.help-content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.help-card {
    background-color: #16181c;
    padding: 20px;
    border-radius: 16px;
    transition: background-color 0.2s;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
}

.help-card:hover {
    background-color: #1d1f23;
}

.help-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.help-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

/* Grok Page */
.grok-page {
    background-color: black;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
    position: relative;
}

.grok-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1d2535 0%, #000000 70%);
    z-index: 0;
}

.grok-content-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.grok-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.grok-logo-text {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.grok-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.grok-hero-text {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #808080;
}

.grok-input-container {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.grok-input-box {
    width: 100%;
    background-color: #16181c;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px;
    color: white;
    font-size: 16px;
    resize: none;
    height: 100px;
    outline: none;
}

.grok-input-box:focus {
    border-color: #1d9bf0;
}

.grok-footer {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.grok-btn {
    background-color: white;
    color: black;
    border: none;
    padding: 10px 24px;
    border-radius: 9999px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
}

/* Policy Pages (TOS, Privacy, Cookies) */
.policy-container {
    min-height: 100vh;
    background-color: black;
    color: white;
    display: flex;
    flex-direction: column;
}

.policy-header {
    padding: 20px 40px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
}

.policy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
}

.policy-content h1 {
    font-size: 40px;
    margin-bottom: 10px;
}