:root {
    --primary-color: #6C13FF;
    --secondary-color: #13A4FF;
    --accent-color: #FF13C6;
    --background-dark: #0F0F1B;
    --background-light: #1A1A2E;
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8D1;
    --success-color: #00E676;
    --error-color: #FF5252;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-effect: rgba(255, 255, 255, 0.1);
    --neon-glow: 0 0 10px rgba(108, 19, 255, 0.7);
    --disabled-bg: rgba(255, 255, 255, 0.08);
    --disabled-border: rgba(108, 19, 255, 0.3);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(108, 19, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(19, 164, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

.btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
    z-index: -2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 0;
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(108, 19, 255, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(108, 19, 255, 0.7);
}

/* Layout Structure */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    height: 100%;
    background: var(--background-light);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    transition: width 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.logo-icon {
    color: var(--accent-color);
    font-size: 24px;
    margin-right: 10px;
    filter: drop-shadow(0 0 5px var(--accent-color));
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    max-width: 250px;
    line-height: 1.2;
}

.logo-subtitle-static {
    animation: none;
    transform: none;
    opacity: 1;
    font-weight: 500;
    margin-top: 2px;
}

.user-profile {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar-container {
    position: relative;
    margin-right: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(108, 19, 255, 0.5);
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(108, 19, 255, 0.8);
}

.online-indicator {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--success-color);
    border-radius: 50%;
    border: 2px solid var(--background-light);
    bottom: 0;
    right: 0;
    box-shadow: 0 0 5px rgba(0, 230, 118, 0.8);
    animation: pulseBlink 2s infinite;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    margin-bottom: 2px;
}

.status {
    font-size: 12px;
    color: var(--success-color);
}

.nav-menu {
    padding: 20px 10px;
    flex-grow: 1;
}

.nav-menu ul {
    list-style: none;
}

.nav-item {
    margin-bottom: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-item a i {
    margin-right: 15px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-item:hover a {
    background: var(--glass-effect);
    transform: translateX(5px);
}

.nav-item.active a {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--neon-glow);
}

.sidebar-footer {
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    background: var(--background-dark);
    padding: 20px;
    position: relative;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--background-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(108, 19, 255, 0.2);
    outline: none;
}

.form-control:disabled {
    background-color: var(--disabled-bg);
    border: 1px solid var(--disabled-border);
    color: var(--text-primary);
    opacity: 0.8;
    cursor: not-allowed;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Landing Page */
.hero-section {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-logo {
    font-size: 72px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(108, 19, 255, 0.3);
}

.hero-subtitle {
    font-size: 24px;
    margin-bottom: 40px;
    color: var(--text-secondary);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-image {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    max-width: 700px;
    opacity: 0.1;
    pointer-events: none;
}

/* Chat Styles */
.chat-container {
    display: flex;
    height: calc(100vh - 40px);
    overflow: hidden;
}

.chat-sidebar {
    width: 300px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}

.chat-search {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-search-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 50px;
    border: none;
    background: var(--background-light);
    color: var(--text-primary);
}

.chat-list {
    padding: 10px 0;
}

.chat-item {
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-item.active {
    background: linear-gradient(45deg, rgba(108, 19, 255, 0.1), rgba(19, 164, 255, 0.1));
    border-left: 3px solid var(--primary-color);
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.chat-info {
    flex-grow: 1;
}

.chat-name {
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.chat-last-message {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.chat-meta {
    text-align: right;
    margin-left: 10px;
}

.chat-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.unread-count {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    font-size: 12px;
    line-height: 20px;
    animation: bounce 1s infinite;
}

.chat-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-header-info {
    margin-left: 15px;
    flex-grow: 1;
}

.chat-header-actions {
    display: flex;
}

.chat-header-actions button {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.chat-header-actions button:hover {
    color: var(--primary-color);
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 70%;
    margin-bottom: 20px;
    position: relative;
    align-self: flex-start;
    animation: messageSlideIn 0.3s ease;
}

.message.own {
    align-self: flex-end;
}

.message-content {
    padding: 12px 15px;
    border-radius: 18px;
    background: var(--background-light);
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.message.own .message-content {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.message-timestamp {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 5px;
    text-align: right;
}

.message.own .message-timestamp {
    color: rgba(255, 255, 255, 0.7);
}

.chat-input {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.chat-input-field {
    flex-grow: 1;
    padding: 12px 15px;
    border-radius: 50px;
    border: none;
    background: var(--background-light);
    color: var(--text-primary);
    font-size: 16px;
}

.chat-input-actions {
    display: flex;
    margin-left: 10px;
}

.chat-input-actions button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-actions button:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* Profile Page */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(108, 19, 255, 0.5);
    animation: float 6s ease-in-out infinite;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-info {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary-color);
    animation: colorCycle 10s infinite alternate;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes pulseBlink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes messageSlideIn {
    from { transform: translateX(-10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes colorCycle {
    0% { color: var(--primary-color); }
    33% { color: var(--secondary-color); }
    66% { color: var(--accent-color); }
    100% { color: var(--primary-color); }
}

@keyframes typing {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes blink {
    0%, 100% { background-color: rgba(255, 255, 255, 0); }
    50% { background-color: rgba(255, 255, 255, 0.7); }
}

@keyframes glowingBorder {
    0% { box-shadow: 0 0 5px rgba(108, 19, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(108, 19, 255, 0.8), 0 0 30px rgba(19, 164, 255, 0.5); }
    100% { box-shadow: 0 0 5px rgba(108, 19, 255, 0.5); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

.glow-effect {
    animation: glowingBorder 2s infinite;
}

.typed-text {
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(30, end), blink 0.7s step-end infinite;
}

.delayed-1 {
    animation-delay: 0.2s;
}
.delayed-2 {
    animation-delay: 0.4s;
}
.delayed-3 {
    animation-delay: 0.6s;
}

.hover-scale {
    transition: transform 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.05);
}

.rotate-icon {
    animation: rotateAnim 10s linear infinite;
}

@keyframes rotateAnim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pulse-on-load {
    animation: pulse 0.5s ease-in-out;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        width: calc(100% - 240px);
    }
    
    .sidebar-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        margin: 0;
        padding: 0;
        width: 100vw;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        width: 100vw;
        max-width: 100%;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateY(0);
    }
    
    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 10px rgba(108, 19, 255, 0.7);
        transition: all 0.3s ease;
    }
    
    .sidebar.active + .sidebar-toggle {
        left: -50px;
        opacity: 0;
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
        padding-top: 60px;
    }
    
    .chat-container, .user-list-container {
        border-radius: 0;
    }
    
    .message {
        max-width: 85%;
    }
}

@media (max-width: 576px) {
    .sidebar-header {
        padding: 15px 10px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .user-profile {
        padding: 15px 10px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
    }
    
    .user-info .username {
        font-size: 14px;
    }
    
    .nav-menu li a {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .chat-header {
        padding: 10px;
    }
    
    .chat-header-info h2 {
        font-size: 16px;
    }
    
    .chat-messages {
        padding: 15px 10px;
    }
    
    .message-content {
        padding: 10px;
        font-size: 14px;
    }
    
    .chat-input {
        padding: 10px;
    }
    
    .chat-input-field {
        padding: 10px;
        font-size: 14px;
    }
    
    .chat-input-actions button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .card {
        padding: 15px;
    }
    
    .card-header h2 {
        font-size: 18px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
} 