:root {
    --primary-color: #4361ee;
    --primary-light: #4cc9f0;
    --secondary-color: #3f37c9;
    --success-color: #4ad66d;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    /* Light Mode Colors */
    --bg-color: #ffffff;
    --text-color: #212529;
    --card-bg: #f8f9fa;
    --border-color: #e9ecef;
}

.dark-mode {
    /* Dark Mode Colors */
    --bg-color: #15202b;
    --text-color: #f8f9fa;
    --card-bg: #192734;
    --border-color: #38444d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}



.retweeted {
    color: #00c851 !important;
}


/* Header Styles */
.main-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav i {
    font-size: 1.2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 8px 20px;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.2rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.theme-toggle i {
    position: absolute;
    transition: var(--transition);
    opacity: 0;
}

.theme-toggle .fa-moon {
    opacity: 1;
}

.dark-mode .theme-toggle .fa-moon {
    opacity: 0;
}

.dark-mode .theme-toggle .fa-sun {
    opacity: 1;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Koneh Container */
.koneh-container {
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.koneh-original {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.post {
    display: flex;
    gap: 15px;
}

.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.post-author-info strong {
    font-weight: 700;
}

.post-username {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.post-content {
    flex-grow: 1;
    word-break: break-word;
    overflow-wrap: break-word;

}

.post-text {
    margin-bottom: 15px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;

}

.post-meta {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    max-width: 400px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: var(--border-radius);
}

.action-btn:hover {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.reply-btn:hover {
    color: var(--primary-color);
}

.retweet-btn:hover {
    color: #17bf63;
}

.like-btn:hover {
    color: #e0245e;
}

/* Reply Form */
.reply-form-container {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.compose-reply {
    display: flex;
    gap: 15px;
}

.reply-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.reply-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reply-input {
    flex-grow: 1;
}

.reply-input textarea {
    width: 100%;
    border: none;
    background-color: transparent;
    resize: none;
    height: 100px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    color: var(--text-color);
    padding: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.reply-input textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.reply-actions {
    display: flex;
    justify-content: flex-end;
}

.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.login-prompt {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.login-prompt a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Replies List */
.replies-list {
    padding: 15px;
}

.replies-title {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.reply-item {
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: var(--border-radius);
    background-color: rgba(67, 97, 238, 0.05);
    transition: var(--transition);
}

.reply-item:last-child {
    border-bottom: none;
}

.reply-content {
    flex-grow: 1;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.reply-header strong {
    color: var(--primary-color);
}

.reply-text {
    padding-left: 10px;
    line-height: 1.5;
    margin-bottom: 10px;
    border-left: 2px solid var(--primary-light);
}

.reply-actions {
    display: flex;
    gap: 20px;
}

.empty-replies {
    text-align: center;
    padding: 30px;
    color: var(--gray-color);
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--gray-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.main-footer p {
    text-align: center;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-actions .btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .koneh-container {
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    .post-actions {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .post-text, .reply-text {
        font-size: 1rem;
    }
    
    .post-avatar, .reply-avatar {
        width: 40px;
        height: 40px;
    }
    
    .reply-form-container {
        padding: 10px;
    }
    
    .reply-actions {
        gap: 10px;
    }
}










.media-container {
    margin-top: 15px;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.image-wrapper img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* نسبة 16:9 */
    height: 0;
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}







.action-btn {
    position: relative;
    overflow: hidden;
}

.action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(67, 97, 238, 0.2);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.action-btn:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.retweet-btn.retweeted i,
.like-btn.liked i {
    animation: pop 0.3s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}




.hashtag {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.hashtag:hover {
    text-decoration: underline;
}