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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #FFFC00;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    text-align: center;
    color: #000;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 900;
}

.auth-box h2 {
    text-align: center;
    color: #333;
    font-size: 24px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #FFFC00;
    color: #000;
    width: 100%;
    font-weight: 700;
}

.btn-primary:hover {
    background: #ffe600;
}

.btn-secondary {
    background: #fff;
    color: #000;
    border: 2px solid #000;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #000;
    font-weight: 600;
}

.main-header {
    background: #FFFC00;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: #000;
    text-decoration: none;
}

.main-nav a {
    margin-left: 30px;
    color: #000;
    text-decoration: none;
    font-weight: 600;
}

.main-nav a:hover {
    opacity: 0.7;
}

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

.messages-container,
.search-container,
.profile-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
}

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

.messages-header .btn {
    width: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
    border-radius: 8px;
    margin-bottom: 5px;
}

.conversation-item:hover {
    background: #fffef0;
}

.conversation-item.unread {
    background: #fffef0;
    border-left: 4px solid #FFFC00;
}

.conversation-avatar img,
.avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.avatar-placeholder,
.avatar-placeholder-large {
    background: #FFFC00;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.avatar-placeholder {
    width: 50px;
    height: 50px;
    font-size: 20px;
}

.avatar-placeholder-large {
    width: 120px;
    height: 120px;
    font-size: 48px;
    border-radius: 50%;
}

.conversation-info {
    flex: 1;
    margin-left: 15px;
}

.conversation-name {
    font-weight: 700;
}

.conversation-message {
    color: #666;
    font-size: 14px;
}

.conversation-time {
    color: #999;
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state a {
    color: #000;
    font-weight: 600;
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    background: #FFFC00;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    font-size: 24px;
    text-decoration: none;
    color: #000;
    font-weight: bold;
}

.chat-user-info {
    flex: 1;
    font-weight: 700;
    color: #000;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
}

.message {
    max-width: 70%;
    margin-bottom: 15px;
}

.message.sent {
    margin-left: auto;
}

.message-text {
    background: white;
    padding: 10px 15px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.sent .message-text {
    background: #FFFC00;
    color: #000;
    font-weight: 500;
}

.message-media img {
    max-width: 100%;
    border-radius: 12px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.chat-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-input input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
}

.chat-input button {
    padding: 10px 20px;
    background: #FFFC00;
    color: #000;
    font-weight: 700;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.chat-input button:hover {
    background: #ffe600;
}

.media-btn {
    cursor: pointer;
    font-size: 24px;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.search-form button {
    padding: 12px 24px;
    background: #FFFC00;
    color: #000;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.search-form button:hover {
    background: #ffe600;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.user-info {
    flex: 1;
    margin-left: 15px;
}

.user-name {
    font-weight: 700;
}

.user-bio {
    color: #666;
    font-size: 14px;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.user-actions .btn {
    width: auto;
    padding: 8px 16px;
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 900;
    color: #000;
}

.stat-label {
    color: #666;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.profile-actions .btn {
    width: auto;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

@media (max-width: 768px) {
    .main-nav a {
        margin-left: 15px;
        font-size: 14px;
    }
    
    .message {
        max-width: 85%;
    }
}
