* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f0f2f5;
    --text-primary: #262626;
    --text-secondary: #000000;
    --text-muted: #8e8e8e;
    --border-color: #dbdbdb;
    --border-light: #efefef;
    --accent: #0095f6;
    --danger: #ff3366;
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #121212;
    --bg-tertiary: #1a1a1a;
    --text-primary: #f1f5f9;
    --text-secondary: #ffffff;
    --text-muted: #94a3b8;
    --border-color: #333333;
    --border-light: #262626;
    --accent: #3b82f6;
    --danger: #f43f5e;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 100;
    padding-top: 20px;
}
.header h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
}
.header a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

/* Login Box */
.login-box {
    margin-top: 100px;
    text-align: center;
}
.login-box h2 {
    margin-bottom: 20px;
    font-weight: 400;
}
.login-box input[type="password"], .login-box input[type="text"] {
    padding: 12px;
    width: 100%;
    max-width: 300px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 4px;
    margin-bottom: 10px;
    outline: none;
}
.login-box button {
    padding: 12px 20px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* Custom Audio Player */
.custom-audio-player {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 10px;
    margin-bottom: 15px;
}
.custom-audio-player .play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    margin-right: 15px;
}
.custom-audio-player .audio-info {
    display: flex;
    flex-direction: column;
}
.custom-audio-player .audio-title {
    font-size: 14px;
    font-weight: 600;
}
.custom-audio-player .audio-status {
    font-size: 12px;
    color: #8e8e8e;
}
.yt-hidden { display: none; }

/* Posts */
.post {
    margin-bottom: 40px;
    border: 1px solid #efefef;
    border-radius: 4px;
    overflow: hidden;
}
.post-media {
    width: 100%;
    background: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
}
.post-media img, .post-media video {
    width: 100%;
    max-height: 800px;
    object-fit: contain;
}

.post-content {
    padding: 15px;
}
.post-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.post-actions a, .share-copy {
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.post-caption {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}
.post-time {
    font-size: 12px;
    color: #8e8e8e;
    margin-bottom: 15px;
}

/* Comments */
.comments-section {
    border-top: 1px solid #efefef;
    padding-top: 15px;
}
.comment {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}
.comment-time {
    font-size: 11px;
    color: #8e8e8e;
    margin-left: 8px;
}

.comment-form {
    display: flex;
    margin-top: 15px;
    border-top: 1px solid #efefef;
    padding-top: 10px;
}
.comment-form input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 0;
    font-size: 14px;
}
.comment-form button {
    background: none;
    border: none;
    color: #0095f6;
    font-weight: 600;
    cursor: pointer;
    padding: 0 10px;
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
}

.share-copy {
    font-size: 12px;
    background: #f1f1f1;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* Chatline UI */
.timeline {
    position: relative;
    padding: 20px 0;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: var(--border-light);
}
.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 50px;
}
.timeline-dot {
    position: absolute;
    left: 14px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
}
.timeline-item.me .timeline-dot {
    background: var(--danger);
}
.timeline-content {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    position: relative;
    width: 85%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}
.timeline-item.me .timeline-content {
    background: var(--bg-tertiary);
    margin-left: auto;
}
.timeline-time {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Identity Modal */
.identity-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-primary);
    opacity: 0.95;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.identity-card {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}
.identity-card h3 {
    margin-bottom: 20px;
}
.identity-card form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.identity-card label {
    padding: 15px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.identity-card label:hover {
    border-color: #0095f6;
}
.identity-card input[type="radio"] {
    display: none;
}
.identity-card input[type="radio"]:checked + span {
    color: #0095f6;
}
