* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    margin: 0 auto 16px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-brand .icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.main-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 40px 24px;
}

.content-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    padding: 40px;
    animation: slideUp 0.5s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    font-family: inherit;
}

.form-group input[type="text"]:hover,
.form-group input[type="password"]:hover {
    border-color: var(--primary-light);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.form-help {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.form-help svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-help strong {
    color: var(--primary-color);
    font-weight: 600;
}

.form-actions {
    margin-top: 32px;
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary svg {
    width: 20px;
    height: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-logout svg {
    width: 18px;
    height: 18px;
}

.btn-logout:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy svg {
    width: 16px;
    height: 16px;
}

.btn-copy:hover {
    background: var(--primary-dark);
}

/* Messages */
.message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #6ee7b7;
}

.message.error,
.error-message {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #fca5a5;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.error-message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Info Box */
.info-box {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.info-box h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.info-box h3 svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.url-display {
    display: flex;
    gap: 12px;
    align-items: center;
}

.url-display code {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.tab-button svg {
    width: 18px;
    height: 18px;
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Convert Tips Section */
.convert-tips-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.convert-tips-section h2 svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.section-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.converted-result {
    margin-top: 32px;
}

.result-info {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.result-info p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.result-info strong {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
    min-width: 120px;
}

.result-info span {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    background: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 640px) {
    .login-box,
    .content-box {
        padding: 24px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .nav-content {
        padding: 12px 16px;
    }
    
    .nav-brand span {
        display: none;
    }
    
    .url-display {
        flex-direction: column;
    }
    
    .btn-copy {
        width: 100%;
        justify-content: center;
    }
    
    .tabs-container {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-button {
        border-bottom: 2px solid var(--border-color);
        border-left: 3px solid transparent;
        border-radius: 0;
    }
    
    .tab-button.active {
        border-bottom-color: var(--border-color);
        border-left-color: var(--primary-color);
    }
    
    .convert-tips-section h2 {
        font-size: 20px;
    }
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Chat History Section */
.chat-history-section {
    margin-top: 0;
}

.chat-container {
    display: flex;
    gap: 20px;
    height: 70vh;
    min-height: 600px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.chat-sidebar {
    width: 350px;
    border-right: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.chat-sidebar-header {
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-sidebar-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.chat-sidebar-header h2 svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-primary);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.chat-item {
    padding: 14px;
    margin-bottom: 8px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-item:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(4px);
}

.chat-item.active {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.chat-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-item-title svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.chat-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.chat-item-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
}

.chat-item-match {
    background: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    margin-left: 6px;
}

.chat-item-meta > div {
    display: flex;
    align-items: center;
}

.chat-item-date {
    font-size: 11px;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-main-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.chat-main-empty svg {
    width: 80px;
    height: 80px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.chat-main-empty h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.chat-main-empty p {
    font-size: 14px;
    color: var(--text-secondary);
}

.chat-messages-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-header-info {
    margin-bottom: 12px;
}

.chat-header-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.chat-header-info span {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.chat-filter-box {
    position: relative;
    display: flex;
    align-items: center;
}

.chat-filter-box svg {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

.chat-filter-box input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-primary);
    transition: all 0.3s ease;
}

.chat-filter-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-primary);
}

.message-item {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.message-item:hover {
    box-shadow: var(--shadow-sm);
}

.message-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.message-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.message-user-bot {
    color: var(--primary-color);
}

.message-user svg {
    width: 16px;
    height: 16px;
}

.message-date {
    font-size: 11px;
    color: var(--text-secondary);
}

.message-text {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

.message-text.highlight {
    background: rgba(255, 235, 59, 0.3);
    padding: 2px 4px;
    border-radius: 4px;
}

.loading-chats,
.loading-messages {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--border-color);
    margin-bottom: 16px;
}

/* Responsive Chat */
@media (max-width: 1024px) {
    .chat-container {
        flex-direction: column;
        height: auto;
        min-height: 500px;
    }
    
    .chat-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        max-height: 300px;
    }
    
    .chat-main {
        min-height: 400px;
    }
}

@media (max-width: 640px) {
    .chat-container {
        height: auto;
        min-height: 400px;
    }
    
    .chat-sidebar {
        max-height: 250px;
    }
    
    .chat-item-title {
        font-size: 14px;
    }
    
    .message-item {
        padding: 10px 12px;
    }
    
    .message-text {
        font-size: 13px;
    }
}

/* ========== MESSAGES CONFIG STYLES ========== */

.messages-config-section {
    width: 100%;
}

.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.messages-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
}

.messages-header h2 svg {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.messages-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.message-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.message-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.message-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.message-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.message-card-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

.btn-icon:hover svg {
    color: var(--primary-color);
}

.btn-icon-danger:hover {
    background: #fee2e2;
    border-color: var(--error-color);
}

.btn-icon-danger:hover svg {
    color: var(--error-color);
}

.message-card-content {
    padding: 16px 20px;
    max-height: 150px;
    overflow-y: auto;
}

.message-card-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.message-card-footer {
    padding: 16px 20px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.message-link-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-link-box code {
    display: block;
    background: var(--bg-secondary);
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    white-space: nowrap;
}

.message-link-box small {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpModal 0.3s ease;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.modal-close:hover {
    background: var(--bg-primary);
}

.modal-close:hover svg {
    color: var(--text-primary);
}

#messageForm {
    padding: 24px;
}

#messageForm textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

#messageForm textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Loading states */
.loading-messages {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Responsive Messages Config */
@media (max-width: 768px) {
    .messages-list {
        grid-template-columns: 1fr;
    }
    
    .messages-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .messages-header h2 {
        font-size: 20px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
}
