/* Aortex | Global Chat - FULLY RESPONSIVE Professional Dark/Light Mode Theme */

/* Light Mode Variables (Default) */
:root {
    --primary-purple: #6c42f5;
    --secondary-purple: #9e6fff;
    --accent: #d1b3ff;
    --background: #f8f6fc;
    --header-bg: #49328a;
    --footer-bg: #35205c;
    --input-bg: #ede7f6;
    --output-bg: ;
    --button-bg: #6c42f5;
    --button-hover: #9e6fff;
    --border: #b8a1e3;
    --admin: #ffe6ea;
    --white: #ffffff;
    --shadow: 0 4px 16px rgba(108, 66, 245, 0.12);
    --text-dark: #382168;
    --text-stats: #7c3aed;
    --text-light: #7c3aed;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --online: #10b981;
    --card-bg: #ffffff;
    --chat-bg: #ffffff;
    --message-bg: #ede7f6;
    --modal-bg: rgba(108, 66, 245, 0.2);
    --placeholder-color: #b8a1e3;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-purple: #8b5cf6;
    --secondary-purple: #a78bfa;
    --accent: #c4b5fd;
    --background: #0f0f23;
    --header-bg: #1a1a2e;
    --footer-bg: #16213e;
    --input-bg: #2d1b69;
    --button-bg: #7c3aed;
    --button-hover: #8b5cf6;
    --border: #4c1d95;
    --admin: #2d1b69;
    --white: #f8fafc;
    --shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
    --text-stats: #6d28d9;
    --text-dark: #e2e8f0;
    --text-light: #a78bfa;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --online: rgb(0, 255, 38);
    --card-bg: #1e1e3f;
    --chat-bg: #1e1e3f;
    --message-bg: #2d1b69;
    --modal-bg: rgba(0, 0, 0, 0.7);
    --placeholder-color: #6d28d9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    background: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: clamp(14px, 2vw, 16px);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--secondary-purple));
    z-index: 1001;
    transition: width 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(15px, 3vw, 20px);
}

/* Header - Fully Responsive */
.main-header {
    background: var(--header-bg);
    color: var(--white);
    padding: clamp(0.75rem, 2vw, 1rem) 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 10px);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.logo i {
    color: var(--accent);
    font-size: clamp(1.5rem, 3.5vw, 1.8rem);
}

.logo a {
    text-decoration: none;
    color: var(--white);
}

/* Theme Toggle Button - Responsive */
.theme-toggle {
    background: var(--input-bg);
    color: var(--text-dark);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: clamp(35px, 8vw, 45px);
    height: clamp(35px, 8vw, 45px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: clamp(8px, 2vw, 15px);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--primary-purple);
    color: var(--white);
    border-color: var(--primary-purple);
    transform: scale(1.05);
}

.theme-toggle i {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    transition: all 0.3s ease;
}

.theme-toggle.rotating i {
    animation: rotate360 0.5s ease-in-out;
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.main-nav {
    display: flex;
    align-items: center;
    gap: clamp(10px, 3vw, 20px);
    flex-wrap: wrap;
}

#guest-nav {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 15px);
    flex-wrap: wrap;
}

#user-nav {
    display: flex;
    align-items: center;
    gap: clamp(10px, 3vw, 20px);
    flex-wrap: wrap;
}

.nav-button {
    background: var(--button-bg);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 18px);
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: clamp(4px, 1.5vw, 8px);
    font-weight: 500;
    margin: 0;
    min-width: clamp(70px, 15vw, 100px);
    white-space: nowrap;
    justify-content: center;
}

.nav-button:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.nav-button.logout {
    background: var(--error);
}

.nav-button.logout:hover {
    background: #dc2626;
}

.welcome-text {
    color: var(--accent);
    font-weight: 500;
    margin-right: clamp(8px, 2vw, 15px);
    display: flex;
    align-items: center;
    gap: clamp(4px, 1.5vw, 8px);
    font-size: clamp(0.8rem, 2vw, 0.875rem);
}

/* Chat Section - Fully Responsive */
#chat-section {
    padding: clamp(40px, 8vw, 60px) 0;
    background: var(--background);
    margin-top: clamp(60px, 12vw, 80px);
}

.chat-container {
    background: var(--card-bg);
    border-radius: clamp(15px, 4vw, 20px);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.chat-header {
    background: linear-gradient(135deg, var(--input-bg), var(--output-bg));
    padding: clamp(20px, 4vw, 25px) clamp(20px, 5vw, 30px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
    gap: 15px;
}

.chat-header h2 {
    color: var(--primary-purple);
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    flex-wrap: wrap;
}

.chat-stats {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 15px);
    color: var(--text-stats);
    font-weight: 500;
    font-size: clamp(0.8rem, 2vw, 0.875rem);
    flex-wrap: wrap;
}

.online-indicator {
    color: var(--online);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#chat-box {
    min-height: clamp(300px, 50vh, 400px);
    max-height: clamp(400px, 60vh, 500px);
    overflow-y: auto;
    padding: clamp(20px, 4vw, 25px) clamp(20px, 5vw, 30px);
    background: var(--chat-bg);
    transition: all 0.3s ease;
}

.chat-placeholder {
    text-align: center;
    color: var(--text-light);
    padding: clamp(40px, 8vw, 60px) clamp(15px, 3vw, 20px);
}

.chat-placeholder i {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: clamp(10px, 3vw, 15px);
    color: var(--placeholder-color);
}

.chat-placeholder p {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: clamp(15px, 3vw, 20px);
    padding: clamp(12px, 3vw, 15px);
    border-radius: clamp(10px, 2.5vw, 12px);
    background: var(--message-bg);
    position: relative;
    transition: all 0.3s ease;
}

.chat-message:hover {
    background: var(--accent);
    transform: translateX(clamp(2px, 1vw, 5px));
}

.chat-message .user-info {
    display: flex;
    align-items: center;
    gap: clamp(6px, 2vw, 10px);
    margin-bottom: clamp(6px, 1.5vw, 8px);
    flex-wrap: wrap;
}

.chat-message .username {
    font-weight: 700;
    color: var(--primary-purple);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.chat-message .timestamp {
    font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    color: var(--text-light);
    opacity: 0.8;
}

.chat-message .content {
    color: var(--text-dark);
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.5;
    word-wrap: break-word;
    margin-left: clamp(3px, 1vw, 5px);
}

.chat-message.admin-message {
    background: var(--admin);
    border-left: 4px solid var(--error);
}

.delete-btn {
    position: absolute;
    top: clamp(8px, 2vw, 10px);
    right: clamp(8px, 2vw, 10px);
    background: var(--error);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: clamp(0.7rem, 1.8vw, 0.8rem);
    padding: clamp(4px, 1vw, 5px) clamp(8px, 2vw, 10px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    z-index: 10;
}

.chat-message:hover .delete-btn {
    display: block;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Welcome Message Section - Responsive */
.welcome-message {
    background: var(--input-bg);
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    padding: clamp(20px, 5vw, 30px);
    transition: all 0.3s ease;
}

.welcome-content {
    text-align: center;
    max-width: clamp(400px, 80vw, 600px);
    margin: 0 auto;
}

.welcome-icon {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--primary-purple);
    margin-bottom: clamp(10px, 3vw, 15px);
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1) rotate(180deg);
        opacity: 0.8;
    }
}

.welcome-content h3 {
    color: var(--primary-purple);
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 700;
    margin-bottom: clamp(10px, 3vw, 15px);
    letter-spacing: 0.5px;
}

.welcome-content p {
    color: var(--text-dark);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: clamp(20px, 4vw, 25px);
    opacity: 0.9;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(120px, 25vw, 150px), 1fr));
    gap: clamp(15px, 3vw, 20px);
    margin-top: clamp(15px, 3vw, 20px);
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 1.5vw, 8px);
    padding: clamp(12px, 3vw, 15px);
    background: var(--card-bg);
    border-radius: clamp(10px, 2.5vw, 12px);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 66, 245, 0.05);
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(108, 66, 245, 0.15);
    border-color: var(--primary-purple);
}

.feature i {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--primary-purple);
    margin-bottom: clamp(3px, 1vw, 5px);
}

.feature span {
    font-weight: 600;
    color: var(--text-dark);
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    text-align: center;
}

/* Message Input - Responsive */
.message-input-container {
    padding: clamp(20px, 4vw, 25px) clamp(20px, 5vw, 30px);
    background: var(--input-bg);
    border-top: 2px solid var(--border);
}

.login-notice {
    text-align: center;
    padding: clamp(15px, 3vw, 20px);
    background: var(--accent);
    border-radius: clamp(10px, 2.5vw, 12px);
    color: var(--primary-purple);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.5vw, 15px);
    flex-wrap: wrap;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.quick-login-btn {
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: clamp(6px, 1.5vw, 8px) clamp(12px, 3vw, 16px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 8px);
    font-weight: 500;
    font-size: clamp(0.8rem, 2vw, 0.875rem);
}

.quick-login-btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.input-group {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 15px);
    background: var(--white);
    border-radius: clamp(10px, 2.5vw, 12px);
    padding: clamp(12px, 3vw, 15px) clamp(15px, 3.5vw, 20px);
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    flex-wrap: wrap;
    overflow: hidden;
    position: relative;
}

.input-group::before,
.input-group::after,
.input-group input::before,
.input-group input::after {
    display: none !important;
    content: none !important;
}

[data-theme="dark"] .input-group {
    background: var(--message-bg);
    border-color: var(--border);
}

.input-group:focus-within {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(108, 66, 245, 0.1);
}

[data-theme="dark"] .input-group:focus-within {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.input-group i {
    color: var(--text-light);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    flex-shrink: 0;
}

.input-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: clamp(0.9rem, 2vw, 1rem);
    background: transparent;
    color: var(--text-dark);
    min-width: 150px;
    /* Remove ALL browser default styling */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    -ms-appearance: none !important;
    
    /* Remove any pseudo-element styling */
    border-radius: 0 !important;
    border-style: none !important;
    border-width: 0 !important;
    
    /* Force transparent everything */
    background-image: none !important;
    background-color: transparent !important;
    
    /* Remove any inherited styling */
    margin: 0 !important;
    padding: 0 !important;
}

.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: var(--text-dark) !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    outline: none !important;
}

.input-group input:focus,
.input-group input:active,
.input-group input:hover {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.input-group input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

#send-btn {
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    border-radius: clamp(8px, 2vw, 10px);
    padding: clamp(10px, 2.5vw, 12px) clamp(18px, 4vw, 24px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: clamp(4px, 1.5vw, 8px);
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
    white-space: nowrap;
}

#send-btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

#send-btn:disabled,
.input-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Admin Controls - Responsive */
#admin-controls {
    padding: clamp(30px, 6vw, 40px) 0;
    background: var(--input-bg);
}

.admin-panel {
    background: var(--card-bg);
    border-radius: clamp(12px, 3vw, 16px);
    padding: clamp(20px, 5vw, 30px);
    box-shadow: var(--shadow);
    border: 2px solid var(--warning);
    transition: all 0.3s ease;
}

.admin-panel h3 {
    color: var(--primary-purple);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: clamp(15px, 3vw, 20px);
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(180px, 40vw, 200px), 1fr));
    gap: clamp(15px, 3vw, 20px);
    margin-bottom: clamp(15px, 3vw, 20px);
}

.admin-stat {
    background: var(--accent);
    padding: clamp(12px, 3vw, 15px) clamp(15px, 3.5vw, 20px);
    border-radius: clamp(8px, 2vw, 10px);
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    color: var(--primary-purple);
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.admin-stat i {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    flex-shrink: 0;
}

/* Modals - Fully Responsive */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: var(--modal-bg);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: clamp(10px, 2vw, 20px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--card-bg);
    border-radius: clamp(15px, 4vw, 20px);
    padding: 0;
    box-shadow: 0 20px 40px rgba(108, 66, 245, 0.3);
    width: 100%;
    max-width: clamp(320px, 90vw, 450px);
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    transition: all 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    color: var(--white);
    padding: clamp(20px, 4vw, 25px) clamp(20px, 5vw, 30px);
    border-radius: clamp(15px, 4vw, 20px) clamp(15px, 4vw, 20px) 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.modal-title {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    flex: 1;
}

.close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: clamp(30px, 6vw, 35px);
    height: clamp(30px, 6vw, 35px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-content form {
    padding: clamp(20px, 5vw, 30px);
}

.modal-content .input-group {
    margin-bottom: clamp(15px, 3vw, 20px);
}

.modal-submit-btn {
    width: 100%;
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    border-radius: clamp(10px, 2.5vw, 12px);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    padding: clamp(12px, 3vw, 15px) 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 2vw, 10px);
    font-weight: 600;
    margin-top: clamp(8px, 2vw, 10px);
}

.modal-submit-btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.message {
    margin-top: clamp(12px, 3vw, 15px);
    padding: clamp(10px, 2.5vw, 12px);
    border-radius: clamp(6px, 1.5vw, 8px);
    font-weight: 500;
    text-align: center;
    min-height: 20px;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
}

.message.error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.message.success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Footer - Fully Responsive */
.main-footer {
    background: var(--footer-bg);
    color: var(--white);
    padding: clamp(40px, 8vw, 50px) 0 clamp(15px, 3vw, 20px);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 40vw, 300px), 1fr));
    gap: clamp(30px, 6vw, 40px);
    margin-bottom: clamp(25px, 5vw, 30px);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    margin-bottom: clamp(10px, 2.5vw, 15px);
}

.footer-logo i {
    color: var(--accent);
    font-size: clamp(1.5rem, 3.5vw, 1.8rem);
}

.footer-info p {
    color: var(--accent);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-bottom: clamp(15px, 3vw, 20px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 30vw, 200px), 1fr));
    gap: clamp(25px, 5vw, 30px);
}

.footer-section h4 {
    color: var(--accent);
    font-size: clamp(1.1rem, 2.5vw, 1.2rem);
    margin-bottom: clamp(12px, 3vw, 15px);
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: clamp(6px, 1.5vw, 8px);
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 8px);
    color: var(--white);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.footer-section li i {
    color: var(--success);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: clamp(10px, 2.5vw, 15px);
    margin-top: clamp(12px, 3vw, 15px);
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(35px, 8vw, 45px);
    height: clamp(35px, 8vw, 45px);
    background: var(--primary-purple);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.social-link:hover {
    background: var(--accent);
    color: var(--primary-purple);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--primary-purple);
    padding-top: clamp(15px, 3vw, 20px);
    text-align: center;
}

.footer-bottom p {
    color: var(--accent);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Scrollbar Styling - Responsive */
#chat-box::-webkit-scrollbar {
    width: clamp(6px, 1.5vw, 8px);
}

#chat-box::-webkit-scrollbar-track {
    background: var(--input-bg);
    border-radius: clamp(3px, 0.75vw, 4px);
}

#chat-box::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: clamp(3px, 0.75vw, 4px);
}

#chat-box::-webkit-scrollbar-thumb:hover {
    background: var(--primary-purple);
}

/* Enhanced Password Toggle Styles */
.password-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: clamp(4px, 1vw, 5px);
    transition: color 0.3s ease;
    font-size: clamp(0.9rem, 2vw, 1rem);
    flex-shrink: 0;
}

.password-toggle:hover {
    color: var(--primary-purple);
}

.input-success {
    border-color: var(--success) !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.input-error {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

/* Notification Styles - Responsive */
.notification {
    position: fixed;
    top: clamp(80px, 15vw, 100px);
    right: clamp(10px, 3vw, 20px);
    padding: clamp(10px, 2.5vw, 12px) clamp(15px, 3.5vw, 20px);
    border-radius: clamp(6px, 1.5vw, 8px);
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 8px);
    min-width: clamp(200px, 40vw, 250px);
    max-width: clamp(280px, 80vw, 350px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: clamp(0.85rem, 2vw, 0.9rem);
}

.notification.show {
    transform: translateX(0);
}

.notification-success { background: #10b981; }
.notification-error { background: #ef4444; }
.notification-warning { background: #f59e0b; }
.notification-info { background: #3b82f6; }

/* Dark mode specific improvements */
[data-theme="dark"] .welcome-message {
    background: var(--message-bg);
    border-color: var(--border);
}

[data-theme="dark"] .welcome-content h3 {
    color: var(--accent);
}

[data-theme="dark"] .welcome-content p {
    color: var(--text-light);
}

[data-theme="dark"] .feature {
    background: var(--input-bg);
    border-color: var(--border);
}

[data-theme="dark"] .feature:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}

[data-theme="dark"] .feature i {
    color: var(--accent);
}

[data-theme="dark"] .feature span {
    color: var(--text-dark);
}

[data-theme="dark"] .chat-placeholder {
    color: var(--text-light);
}

[data-theme="dark"] .chat-placeholder i {
    color: var(--placeholder-color);
}

/* Landscape Orientation Optimizations */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .main-header {
        padding: 0.5rem 0;
    }
    
    #chat-section {
        padding: 20px 0;
        margin-top: 60px;
    }
    
    #chat-box {
        min-height: 200px;
        max-height: 300px;
    }
    
    .welcome-message {
        padding: 15px;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}

/* Ultra-wide Screen Optimizations */
@media screen and (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .chat-container {
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .modal-content {
        max-width: 500px;
    }
}

/* High DPI/Retina Display Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo i,
    .theme-toggle i,
    .nav-button i {
        transform: translateZ(0);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .theme-toggle,
    .nav-button,
    .welcome-message,
    .message-input-container,
    #admin-controls,
    .main-footer,
    .delete-btn,
    .notification {
        display: none !important;
    }
    
    .chat-container {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    #chat-box {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .chat-message {
        break-inside: avoid;
        margin-bottom: 10px;
    }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .sparkle,
    .pulse,
    .float,
    .rotate360 {
        animation: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border: #000;
        --text-muted: #000;
        --bg-secondary: #fff;
    }
    
    [data-theme="dark"] {
        --border: #fff;
        --text-muted: #fff;
        --bg-secondary: #000;
    }
}

/* Focus Indicators for Better Accessibility */
.nav-button:focus,
.theme-toggle:focus,
.quick-login-btn:focus,
#send-btn:focus,
.modal-submit-btn:focus,
.close-btn:focus,
.social-link:focus,
.password-toggle:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

input:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: -2px;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-button,
    .theme-toggle,
    .quick-login-btn,
    #send-btn,
    .modal-submit-btn,
    .social-link,
    .delete-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .chat-message:hover {
        transform: none;
    }
    
    .delete-btn {
        opacity: 0.7;
        display: block;
    }
    
    .feature:hover {
        transform: none;
    }
}

/* Error Notification Styles */
.error-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--card-bg);
    border: 2px solid var(--error);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
    overflow: hidden;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.error-header {
    background: var(--error);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.error-header i {
    font-size: 1.2rem;
}

.error-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.error-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.error-body {
    padding: 20px;
    color: var(--text-dark);
}

.error-body p {
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.error-body details {
    margin-top: 15px;
}

.error-body summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 10px;
}

.error-body pre {
    background: var(--input-bg);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Dark mode error notification */
[data-theme="dark"] .error-notification {
    background: var(--card-bg);
    border-color: var(--error);
}

[data-theme="dark"] .error-body pre {
    background: var(--message-bg);
    color: var(--text-light);
}