.discord-panel {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.discord-header {
    background: linear-gradient(135deg, #0da4d3 0%, #7289DA 100%);
    color: white;
    padding: 24px;
    text-align: center;
    position: relative;
}

.discord-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.discord-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.discord-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.discord-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.channel-section {
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
}


.channel-select {
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 16px;
    color: #495057;
    transition: all 0.2s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.channel-select option {
    color: #495057;
    background: white;
    padding: 8px;
}

.channel-select option:first-child {
    color: #6c757d;
    font-style: italic;
}

.channel-select:focus {
    outline: none;
    border-color: #0da4d3;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.channel-select:hover {
    border-color: #dee2e6;
}

.messages-section {
    padding: 24px;
    background: white;
}

.messages-container {
    height: 400px;
    border: 2px solid #f1f3f4;
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
    background: #fafbfc;
    position: relative;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #c1c8cd;
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: #a8b2ba;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-size: 14px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #0da4d3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

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

.message-item {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #0da4d3;
    transition: all 0.2s ease;
}

.message-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

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

.message-author {
    font-weight: 600;
    color: #0da4d3;
    font-size: 14px;
}

.message-time {
    font-size: 12px;
    color: #6c757d;
}

.message-content {
    color: #495057;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-wrap: break-word;
}

.input-section {
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.input-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.message-input {
    width: 100%;
    padding: 12px 70px 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.character-count {
    position: absolute;
    right: 12px;
    bottom: 10px;
    font-size: 11px;
    color: #6c757d;
    pointer-events: none;
    background: white;
    padding: 0 2px;
}

.character-count.warning {
    color: #ff9800;
}

.character-count.error {
    color: #dc3545;
    font-weight: bold;
}

.message-input:focus {
    outline: none;
    border-color: #0da4d3;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.message-input::placeholder {
    color: #adb5bd;
}

.send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #0da4d3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(88, 101, 242, 0.3);
}

.send-button:hover {
    background: #4752c4;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(88, 101, 242, 0.4);
}

.send-button:active {
    transform: translateY(0);
}

.send-button:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-older-messages {
    text-align: center;
    padding: 15px;
    color: #6c757d;
    font-size: 13px;
}

.loading-older-messages .loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #0da4d3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.send-button.loading {
    background: #0da4d3;
    cursor: wait;
}

.send-button .send-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    margin-bottom: 12px;
    font-size: 14px;
}

.input-error-message {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    font-size: 13px;
    border-left: 3px solid #dc3545;
    animation: slideDown 0.3s ease;
}

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

.message-input.error {
    border-color: #dc3545;
}

.message-input.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.empty-state {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
}

/* Connect Prompt Styles */
.discord-connect-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 40px;
}

.connect-content {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.connect-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #0da4d3;
    border-radius: 50%;
    margin-bottom: 24px;
    color: white;
}

.connect-content h3 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    color: #495057;
}

.connect-content p {
    margin: 0 0 32px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #6c757d;
}

.connect-button {
    display: inline-block;
    padding: 12px 24px;
    background: #0da4d3;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(88, 101, 242, 0.3);
}

.connect-button:hover {
    background: #4752c4;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(88, 101, 242, 0.4);
    color: white;
    text-decoration: none;
}

.connect-note {
    margin-top: 24px !important;
    font-size: 14px;
    color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .discord-panel {
        margin: 0 16px;
        border-radius: 8px;
    }
    
    .discord-header {
        padding: 20px;
    }
    
    .discord-header h2 {
        font-size: 24px;
    }
    
    .channel-section,
    .messages-section,
    .input-section {
        padding: 16px;
    }
    
    .messages-container {
        height: 300px;
    }
    
    .input-container {
        gap: 8px;
    }
    
    .send-button {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .discord-panel {
        margin: 0 8px;
    }
    
    .discord-header h2 {
        font-size: 20px;
    }
    
    .discord-header p {
        font-size: 14px;
    }
    
    .messages-container {
        height: 250px;
    }
}

