/* AINN - Advanced Instant Network Node */
/* 2K25 Edition - Vibrant Orange/Teal Theme */

:root {
    --primary-orange: #FF7A00;
    --primary-gold: #FFC300;
    --teal: #00C3A0;
    --cyan: #00A3FF;
    --warm-light: #FFD180;
    --warm-dark: #FFB74D;
    --cream: #FFF4E5;
    --accent-glow: #FFD54F;
    --shadow-soft: 0 4px 20px rgba(255, 122, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(255, 213, 79, 0.3);
    --radius: 20px;
    --radius-small: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--cream);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: var(--radius);
    padding: 40px 30px;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.logo-glow {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
    padding: 4px;
    box-shadow: var(--shadow-glow);
}

.app-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.login-header h1 {
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.tagline {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.edition {
    color: #888;
    font-size: 0.8em;
    font-weight: 500;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.9em;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: var(--radius-small);
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 195, 160, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
    color: white;
    border: none;
    border-radius: var(--radius-small);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 122, 0, 0.3);
}

.divider {
    margin: 20px 0;
    color: #999;
    font-size: 0.9em;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
    z-index: 1;
}

.divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.alert {
    padding: 12px;
    border-radius: var(--radius-small);
    margin-bottom: 20px;
    font-size: 0.9em;
}

.alert.error {
    background: #ffe6e6;
    color: #d63031;
    border: 1px solid #ffcccc;
}

.login-info {
    margin-top: 30px;
    font-size: 0.8em;
    color: #888;
}

/* Chat Interface */
.chat-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--cream);
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.header-info h1 {
    font-size: 1.2em;
    font-weight: 600;
}

.user-status {
    font-size: 0.8em;
    opacity: 0.9;
}

.status-online {
    color: #00ff88;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 15px;
    border-radius: var(--radius);
    position: relative;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    color: white;
    border-bottom-right-radius: 5px;
}

.message-received {
    align-self: flex-start;
    background: linear-gradient(135deg, var(--warm-light), var(--warm-dark));
    color: #333;
    border-bottom-left-radius: 5px;
}

.message-content {
    word-wrap: break-word;
}

.message-media {
    max-width: 100%;
    border-radius: var(--radius-small);
    margin-top: 10px;
}

.message-time {
    font-size: 0.7em;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

.message-status {
    font-size: 0.7em;
    margin-left: 5px;
}

/* Typing Indicator */
.typing-indicator {
    align-self: flex-start;
    background: var(--warm-light);
    padding: 10px 15px;
    border-radius: var(--radius);
    font-size: 0.9em;
    color: #666;
    display: none;
}

.typing-dots {
    display: inline-flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: typingBounce 1.4s ease-in-out infinite both;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Chat Input */
.chat-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
}

.message-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 120px;
}

.btn-attach, .btn-send, .btn-mic {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.btn-attach {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-send {
    background: linear-gradient(135deg, #ff6b6b, var(--primary-orange));
    color: white;
}

.btn-mic {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.btn-attach:hover, .btn-send:hover, .btn-mic:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 122, 0, 0.3);
}

/* Upload Progress */
.upload-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    text-align: center;
    z-index: 1000;
    display: none;
}

.progress-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.progress-text {
    font-size: 0.9em;
    color: #666;
}

/* Footer */
.footer {
    text-align: center;
    padding: 15px;
    font-size: 0.8em;
    color: #888;
    border-top: 1px solid #eee;
    background: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-header {
        padding: 12px 15px;
    }
    
    .header-info h1 {
        font-size: 1.1em;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-input-container {
        padding: 12px 15px;
    }
    
    .login-container {
        padding: 30px 20px;
        margin: 10px;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-gold));
    border-radius: 3px;
}

/* Animation for new messages */
@keyframes highlightMessage {
    0% {
        background-color: rgba(255, 213, 79, 0.3);
    }
    100% {
        background-color: transparent;
    }
}

.message-highlight {
    animation: highlightMessage 2s ease;
}