.discord-page {
    background-color: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

/* Blobs decorativos */
.discord-blob {
    position: fixed;
    width: 400px;
    height: 400px;
    filter: blur(100px);
    opacity: 0.15;
    z-index: -1;
    border-radius: 50%;
}

.blob-1 {
    background: #007bff;
    top: -100px;
    right: -100px;
}

.blob-2 {
    background: #5865F2; /* Discord Purple */
    bottom: -100px;
    left: -100px;
}

/* Precise Alignment Fix */
.discord-main #main-layout {
    align-items: stretch !important;
    margin-top: 0 !important;
}

.discord-main #main-layout #preview-col {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.discord-main #preview-col .glass-card {
    margin-top: 0 !important;
}

.discord-main #editor-col,
.discord-main #preview-col {
    display: flex;
    flex-direction: column;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.discord-main .glass-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0 !important;
    border-radius: 15px;
}

.discord-main .glass-card > div:first-child {
    min-height: 40px;
    display: flex;
    align-items: center;
}

#main-layout.layout-vertical {
    flex-direction: column;
}

#main-layout.layout-vertical #editor-col,
#main-layout.layout-vertical #preview-col {
    width: 100%;
}

.custom-textarea {
    flex-grow: 1;
    min-height: 300px;
    resize: none;
    font-family: 'Inter', sans-serif;
    padding: 1rem;
    line-height: 1.6;
}

.discord-preview-container {
    background-color: #313338; /* Discord dark theme bg */
    min-height: 300px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.custom-textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.format-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: rgba(255, 255, 255, 0.1);
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #007bff;
}

/* Emoji Picker */
.emoji-dropdown {
    width: 280px;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px);
    background: rgba(15, 15, 15, 0.95) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.no-caret::after {
    display: none !important;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    padding: 5px;
}

.emoji-item {
    cursor: pointer;
    font-size: 1.25rem;
    padding: 5px;
    text-align: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Discord Preview */
.discord-message {
    display: flex;
    gap: 1rem;
}

.discord-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.discord-content {
    display: flex;
    flex-direction: column;
}

/* Discord Header & Bot Tag */
.discord-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.2rem;
}

.discord-username {
    font-weight: 500;
    color: #ffffff;
    margin-right: 0.5rem;
}

.discord-bot-tag {
    background-color: #5865F2;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 0.5rem;
    line-height: 1;
}

.discord-timestamp {
    font-size: 0.75rem;
    color: #b5bac1;
}

.discord-text {
    color: #dbdee1;
    font-size: 1rem;
    line-height: 1.375rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Discord Markdown Elements */
.discord-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.2rem;
}

.discord-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    color: #ffffff;
}

.discord-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.6rem;
    margin-bottom: 0.3rem;
    color: #ffffff;
}

.discord-text ul {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
    list-style-type: disc;
}

.discord-text ol {
    margin-top: 0.5rem;
    padding-left: 1.2rem;
    list-style-type: decimal;
}

.discord-text li {
    margin-bottom: 0.2rem;
}

.discord-text a {
    color: #00a8fc;
    text-decoration: none;
}

.discord-text a:hover {
    text-decoration: underline;
}

.discord-text hr {
    border: none;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
    opacity: 1;
}

.discord-text strong {
    color: #ffffff;
}

.discord-text em {
    font-style: italic;
}

.discord-text u {
    text-decoration: underline;
}

.discord-text s {
    text-decoration: line-through;
}

.discord-text code {
    background: #1e1f22;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.85rem;
}

.discord-text pre {
    background: #2b2d31;
    border: 1px solid #1e1f22;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-family: Consolas, "Courier New", monospace;
}

.discord-text pre code {
    background: none;
    padding: 0;
}

.discord-text blockquote {
    border-left: 4px solid #4e5058;
    padding-left: 0.5rem;
    margin-left: 0.25rem;
}

.discord-text .spoiler {
    background: #1e1f22;
    color: transparent;
    border-radius: 3px;
    padding: 0 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.discord-text .spoiler:hover {
    background: #2b2d31;
}

.discord-text .spoiler.revealed {
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
}

/* Custom Modal */
.custom-modal .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 10, 0.8);
}

.shadow-glow-danger {
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.4);
    transition: all 0.3s ease;
}

.shadow-glow-danger:hover {
    box-shadow: 0 0 25px rgba(220, 53, 69, 0.6);
    transform: translateY(-2px);
}

.btn-close-white {
    filter: invert(1) grayscale(1) brightness(2);
}

/* Responsive */
@media (max-width: 991.98px) {
    .custom-textarea {
        height: 200px;
    }
    .discord-preview-container {
        min-height: 200px;
    }
}
