.dashboard-container {
    padding-top: 80px;
    max-width: 1800px;
    margin: 0 auto;
    padding-left: 2%;
    padding-right: 2%;
}

.dashboard-container h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 3fr 1.3fr;
    gap: 1.5rem;
    height: calc(100vh - 100px);
}

/* Posts Card - Make it the main focus */
.posts-card {
    grid-column: 2;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    min-width: 600px;
}

.posts-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.new-post-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-red));
    color: white;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.new-post-btn:hover {
    transform: translateY(-2px);
}

.posts-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    max-height: calc(100vh - 220px);
}

/* For Webkit browsers (Chrome, Safari) */
.posts-list::-webkit-scrollbar {
    width: 8px;
}

.posts-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.posts-list::-webkit-scrollbar-thumb {
    background: rgba(0, 102, 255, 0.3);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.posts-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 102, 255, 0.5);
}

/* For Firefox */
.posts-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 102, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Analytics Card - Make it smaller */
.analytics-card {
    background: #1a1a2e;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    grid-column: 3;
    position: sticky;
    top: 100px;
    height: fit-content;
    min-width: 400px;
    display: flex;
    flex-direction: column;
}

.analytics-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.analytics-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: calc(100% - 50px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    flex-shrink: 0;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    background: #2d2d44;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    background: #363654;
}

.stat-item h3 {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.3rem;
}

.stat-item p {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

/* AI Card - Adjust size */
.ai-card {
    background: #1a1a2e;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    grid-column: 1;
    position: sticky;
    top: 100px;
    height: calc(100vh - 100px);
    min-width: 350px;
    display: flex;
    flex-direction: column;
}

.ai-card h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.ai-chat {
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.user {
    background: var(--primary-blue);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    flex-direction: row-reverse;
}

.message.ai {
    background: #2d2d44;
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.ai-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex: 1;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: #2d2d44;
    border-radius: 15px;
}

#aiInput {
    flex: 1;
    border: none;
    background: none;
    padding: 0.5rem;
    font-size: 1rem;
    outline: none;
    color: white;
}

#aiInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#aiSend {
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

#aiSend:hover {
    background: var(--primary-red);
    transform: scale(1.05);
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-action-btn {
    background: #2d2d44;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.quick-action-btn:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
}

/* Update scrollbar for dark theme */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #2d2d44;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Post Item Styles */
.post-item {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-content {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    color: #333;
}

.post-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 10px;
    margin: 0.8rem 0;
    background: #f8f9fa;
}

.post-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    margin: 0.8rem 0;
}

.post-stats {
    display: flex;
    gap: 2rem;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 0.8rem;
    margin-top: 0.8rem;
}

.delete-post-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.delete-post-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    transform: translateY(-1px);
}

.delete-post-btn i {
    font-size: 1rem;
}

/* Add loading animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1800px) {
    .dashboard-container {
        max-width: 1600px;
    }
}

@media (max-width: 1600px) {
    .dashboard-container {
        max-width: 1400px;
        padding-left: 3%;
        padding-right: 3%;
    }
}

@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 1fr 2fr;
        gap: 1.5rem;
    }

    .ai-card {
        min-width: unset;
    }

    .posts-card {
        min-width: unset;
    }

    .analytics-card {
        min-width: unset;
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .ai-card, .posts-card, .analytics-card {
        grid-column: 1;
    }

    .ai-card {
        height: 400px;
    }
}

/* New Post Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--background-color);
    margin: 10% auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

#postContent {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    resize: vertical;
}

.post-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

#postImage {
    display: none;
}

.post-options label {
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.post-options label:hover {
    background: rgba(255, 255, 255, 0.2);
}

#submitPost {
    padding: 0.5rem 2rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-red));
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#submitPost:hover {
    transform: translateY(-2px);
}

#submitPost:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Add/Update these mobile-specific styles */

@media (max-width: 1024px) {
    .dashboard-container {
        padding-top: 80px;
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        height: auto;
    }

    .dashboard-container h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
        text-align: center;
    }

    /* Posts Card Mobile Styles */
    .posts-card {
        grid-row: auto;
        padding: 1rem;
        height: auto;
        min-height: 400px;
    }

    .posts-list {
        max-height: 500px;
        margin-bottom: 0;
    }

    /* AI Card Mobile Styles */
    .ai-card {
        position: relative;
        top: auto;
        padding: 1rem;
        height: 400px;
        margin-bottom: 1rem;
    }

    /* Analytics Card Mobile Styles */
    .analytics-card {
        position: relative;
        top: auto;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .chart-container {
        height: 150px;
    }

    /* Adjust spacing between cards */
    .dashboard-card {
        margin-bottom: 1rem;
    }

    /* Remove any fixed heights that might cause issues */
    .dashboard-card {
        height: auto;
    }

    .new-post-btn {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .posts-list {
        max-height: 600px;
    }

    .post-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    /* AI Card Mobile Styles */
    .ai-chat {
        height: 400px;
    }

    .chat-input {
        padding: 0.8rem;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-action-btn {
        width: 100%;
        text-align: center;
    }

    /* Analytics Card Mobile Styles */
    .analytics-card {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .stat-item {
        padding: 0.8rem;
    }

    .stat-item h3 {
        font-size: 0.8rem;
    }

    .stat-item p {
        font-size: 1.2rem;
    }

    /* Modal Mobile Styles */
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1rem;
    }

    #postContent {
        min-height: 120px;
    }

    .post-options {
        flex-direction: column;
        gap: 0.8rem;
    }

    .post-options label {
        width: 100%;
        text-align: center;
    }

    #submitPost {
        width: 100%;
        padding: 0.8rem;
    }
}

/* Additional mobile optimizations for smaller screens */
@media (max-width: 480px) {
    .dashboard-container {
        padding-top: 70px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .dashboard-grid {
        gap: 0.8rem;
    }

    .posts-list {
        max-height: 450px;
    }

    .ai-card {
        height: 350px;
    }
}

/* Add smooth transitions for better mobile experience */
.dashboard-card {
    transition: all 0.3s ease;
}

.post-item, .stat-item, .message {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Update Chart container styles */
.chart-container {
    margin-top: 0.8rem;
    padding: 1rem;
    background: #2d2d44;
    border-radius: 12px;
    height: 180px;
}

#engagementChart {
    width: 100% !important;
    height: 100% !important;
    margin-top: 0.5rem;
    filter: brightness(1.1);
} 