/* Discussions Page Styles */
.discussions {
    background: #141414;
    padding: 100px 0;
    min-height: 100vh;
}

.discussions__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.discussions__header {
    text-align: center;
    margin-bottom: 3rem;
}

.discussions__header h1 {
    font-size: 3rem;
    background: linear-gradient(to right, #ff0844 0%, #fe5196 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.discussions__header p {
    font-size: 1.2rem;
    color: #ccc;
    max-width: 600px;
    margin: 0 auto;
}

.discussions__content {
    display: grid;
    grid-template-columns: 300px 1fr 280px;
    gap: 2rem;
    height: 70vh;
}

/* Discussion Categories */
.discussion__categories {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid #333;
}

.discussion__categories h2 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.categories__grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category__card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.category__card:hover,
.category__card.active {
    border-color: #ff0844;
    background: rgba(255, 8, 68, 0.1);
}

.category__card i {
    font-size: 1.5rem;
    color: #ff0844;
    margin-bottom: 0.5rem;
}

.category__card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.category__card p {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.4;
}

/* Chat Area */
.chat__area {
    background: #1a1a1a;
    border-radius: 15px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat__header {
    background: #2a2a2a;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat__header h3 {
    color: #fff;
    font-size: 1.2rem;
}

.online__count {
    color: #4caf50;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.online__count i {
    font-size: 1rem;
}

/* Messages Container */
.messages__container {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    max-height: 400px;
}

.message {
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.message-header strong {
    color: #ff0844;
    font-size: 0.9rem;
}

.timestamp {
    color: #888;
    font-size: 0.8rem;
}

.message-content {
    color: #fff;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border-left: 3px solid #ff0844;
}

.system-message {
    text-align: center;
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

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

/* Message Input */
.message__input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid #333;
    background: #2a2a2a;
}

.message__form {
    margin-bottom: 0;
}

.input__wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#message-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #333;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#message-input:focus {
    outline: none;
    border-color: #ff0844;
    background: rgba(255, 255, 255, 0.1);
}

#message-input::placeholder {
    color: #888;
}

.send__btn {
    background: #ff0844;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send__btn:hover {
    background: #fe5196;
    transform: scale(1.1);
}

.send__btn i {
    font-size: 1rem;
}

.auth__prompt {
    text-align: center;
    color: #ccc;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.auth__prompt a {
    color: #ff0844;
    text-decoration: none;
}

.auth__prompt a:hover {
    text-decoration: underline;
}

/* Discussion Rules */
.discussion__rules {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid #333;
    height: fit-content;
}

.discussion__rules h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.discussion__rules ul {
    list-style: none;
    padding: 0;
}

.discussion__rules li {
    color: #ccc;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.discussion__rules li i {
    color: #ff0844;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Scrollbar Styling */
.messages__container::-webkit-scrollbar {
    width: 6px;
}

.messages__container::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.messages__container::-webkit-scrollbar-thumb {
    background: #ff0844;
    border-radius: 3px;
}

.messages__container::-webkit-scrollbar-thumb:hover {
    background: #fe5196;
}

/* Mobile Responsiveness */
@media screen and (max-width: 1200px) {
    .discussions__content {
        grid-template-columns: 250px 1fr 250px;
    }
}

@media screen and (max-width: 968px) {
    .discussions__content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        height: auto;
    }

    .discussion__categories {
        order: 1;
    }

    .chat__area {
        order: 2;
        min-height: 500px;
    }

    .discussion__rules {
        order: 3;
    }

    .categories__grid {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .category__card {
        min-width: 200px;
        flex-shrink: 0;
    }
}

@media screen and (max-width: 768px) {
    .discussions__container {
        padding: 0 1rem;
    }

    .discussions__header h1 {
        font-size: 2.5rem;
    }

    .discussions__content {
        gap: 1rem;
    }

    .categories__grid {
        flex-direction: column;
    }

    .category__card {
        min-width: auto;
    }

    .chat__area {
        min-height: 400px;
    }

    .messages__container {
        max-height: 300px;
    }
}

@media screen and (max-width: 480px) {
    .discussions__header h1 {
        font-size: 2rem;
    }

    .discussions__header p {
        font-size: 1rem;
    }

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

    #message-input {
        border-radius: 8px;
    }

    .send__btn {
        align-self: stretch;
        border-radius: 8px;
        width: auto;
        height: 40px;
    }
}