/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: #0078d4;
    transition: color 0.3s ease;
}

a:hover {
    color: #106ebe;
}

img {
    max-width: 100%;
    height: auto;
}

/* Landing Page Styles */
.landing-container {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-logo {
    display: flex;
    align-items: center;
}

.landing-logo img {
    height: 40px;
    margin-right: 10px;
}

.landing-logo h1 {
    font-size: 24px;
    color: #0078d4;
    font-weight: 600;
}

.landing-nav ul {
    display: flex;
    list-style: none;
}

.landing-nav li {
    margin-left: 30px;
}

.landing-nav a {
    color: #333;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
}

.landing-nav a:hover {
    color: #0078d4;
}

.login-btn {
    background-color: #0078d4;
    color: white !important;
    padding: 8px 20px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #106ebe;
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 5%;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
}

.hero-content {
    max-width: 550px;
}

.hero-content h1 {
    font-size: 48px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.primary-btn {
    background-color: #0078d4;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 120, 212, 0.2);
}

.primary-btn:hover {
    background-color: #106ebe;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 120, 212, 0.25);
}

.secondary-btn {
    background-color: transparent;
    color: #0078d4;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    display: inline-block;
    border: 2px solid #0078d4;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background-color: rgba(0, 120, 212, 0.1);
}

.hero-image {
    width: 45%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.features-section {
    padding: 80px 5%;
    text-align: center;
    background-color: white;
}

.features-section h2 {
    font-size: 36px;
    margin-bottom: 50px;
    color: #333;
    position: relative;
}

.features-section h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #0078d4;
    margin: 15px auto 0;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    background-color: rgba(0, 120, 212, 0.1);
    color: #0078d4;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 30px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.feature-card p {
    color: #666;
    font-size: 16px;
}

.about-section {
    padding: 80px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9f9f9;
    gap: 50px;
}

.about-content {
    max-width: 550px;
}

.about-content h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #333;
    position: relative;
}

.about-content h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #0078d4;
    margin: 15px 0 0;
    border-radius: 2px;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

.about-image {
    width: 40%;
}

.contact-section {
    padding: 80px 5%;
    text-align: center;
    background-color: white;
}

.contact-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
    position: relative;
}

.contact-section h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #0078d4;
    margin: 15px auto 0;
    border-radius: 2px;
}

.contact-section > p {
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 18px;
    color: #666;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item i {
    font-size: 24px;
    color: #0078d4;
}

.contact-item p {
    font-size: 16px;
    color: #333;
}

.landing-footer {
    background-color: #263238;
    color: white;
    padding: 60px 5% 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}

.footer-logo h2 {
    font-size: 24px;
    font-weight: 600;
}

.footer-links h3, .footer-social h3 {
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
}

.footer-links h3:after, .footer-social h3:after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: #0078d4;
    margin-top: 10px;
    border-radius: 2px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #0078d4;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #aaa;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f2f5;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Cpath fill="%230078d4" fill-opacity="0.05" d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z"%3E%3C/path%3E%3C/svg%3E');
}

.login-box {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: transform 0.3s ease;
}

.login-box:hover {
    transform: translateY(-5px);
}

.logo {
    width: 180px;
    margin: 0 auto 20px;
    display: block;
}

.login-box h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #0078d4;
}

.login-box h2 {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 30px;
    color: #666;
}

.error {
    background-color: #fde0e0;
    color: #d83b01;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px; /* Increased to prevent zoom on mobile */
    transition: border-color 0.3s ease;
    -webkit-appearance: none; /* Prevents iOS styling */
    appearance: none;
}

.input-group input:focus {
    border-color: #0078d4;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

button {
    background-color: #0078d4;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 500;
}

button:hover {
    background-color: #106ebe;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 120, 212, 0.2);
}

.back-to-home {
    margin-top: 20px;
    font-size: 14px;
}

.back-to-home a {
    color: #555;
    transition: color 0.3s ease;
}

.back-to-home a:hover {
    color: #0078d4;
    text-decoration: underline;
}

/* Chat Page Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 800px; /* Reduced from 100% to make it more compact */
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative; /* Added for fixed positioning of child elements */
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px; /* Reduced padding */
    background-color: #0078d4;
    color: white;
    border-bottom: 1px solid #106ebe;
    position: sticky;
    top: 0;
    z-index: 10;
}

.team-info {
    display: flex;
    align-items: center;
}

.team-info .logo {
    width: 32px; /* Reduced size */
    height: 32px; /* Reduced size */
    margin-right: 8px;
    filter: brightness(0) invert(1);
}

.team-details h1 {
    font-size: 16px; /* Reduced size */
    margin: 0;
}

.team-details p {
    font-size: 11px; /* Reduced size */
    opacity: 0.9;
    margin: 0;
}

.user-actions {
    display: flex;
    align-items: center;
}

.username {
    margin-right: 15px;
    font-weight: 500;
    font-size: 14px; /* Reduced size */
}

.logout-btn {
    color: white;
    text-decoration: none;
    font-size: 12px; /* Reduced size */
    opacity: 0.9;
    transition: opacity 0.3s;
}

.logout-btn:hover {
    opacity: 1;
    text-decoration: underline;
}

.chat-messages {
    flex: 1;
    padding: 15px; /* Reduced padding */
    overflow-y: auto;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px; /* Add padding to prevent messages being hidden under input */
}

.message {
    max-width: 75%; /* Slightly increased for better readability */
    margin-bottom: 12px; /* Reduced spacing */
    padding: 8px 12px; /* Reduced padding */
    border-radius: 16px; /* Slightly reduced */
    position: relative;
    cursor: pointer;
    word-wrap: break-word;
    transition: all 0.2s ease;
    font-size: 14px; /* Added explicit font size */
}

.message-self {
    align-self: flex-end;
    background-color: #0078d4;
    color: white;
    border-bottom-right-radius: 5px;
}

.message-other {
    align-self: flex-start;
    background-color: white;
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-sender {
    font-size: 11px; /* Reduced size */
    font-weight: bold;
    margin-bottom: 2px; /* Reduced spacing */
    color: #555;
}

.message-self .message-sender {
    color: rgba(255, 255, 255, 0.9);
}

.message-time {
    font-size: 9px; /* Reduced size */
    position: absolute;
    bottom: 4px;
    right: 8px;
    opacity: 0.7;
}

.message-self .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.message-other .message-time {
    color: #777;
}

.message-content {
    margin-bottom: 12px; /* Reduced spacing */
}

.showing-real {
    animation: highlight 1.5s ease;
}

@keyframes highlight {
    0% { background-color: rgba(255, 255, 0, 0.3); }
    100% { background-color: transparent; }
}

.system-message {
    align-self: center;
    background-color: rgba(0, 0, 0, 0.1);
    color: #555;
    padding: 6px 12px; /* Reduced padding */
    border-radius: 12px; /* Reduced radius */
    font-size: 11px; /* Reduced size */
    margin: 8px 0; /* Reduced margin */
}

.loading-indicator {
    text-align: center;
    padding: 15px; /* Reduced padding */
    color: #777;
    font-size: 14px; /* Added explicit font size */
}

.chat-input {
    padding: 10px; /* Reduced padding */
    background-color: white;
    border-top: 1px solid #eaeaea;
    position: fixed; /* Fix to bottom */
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    max-width: 800px; /* Match container width */
    margin: 0 auto;
}

.chat-input form {
    display: flex;
}

.chat-input input {
    flex: 1;
    padding: 10px 12px; /* Reduced padding */
    border: 1px solid #ddd;
    border-radius: 18px; /* Slightly reduced */
    font-size: 16px; /* Increased font size to prevent zoom on mobile */
    margin-right: 8px; /* Reduced margin */
    -webkit-appearance: none; /* Prevents iOS styling */
    appearance: none;
}

.chat-input button {
    min-width: 60px; /* Ensure button has a minimum width */
    height: 38px; /* Set a fixed height */
    border-radius: 18px; /* Slightly reduced */
    padding: 0 15px; /* Reduced padding */
    font-size: 16px; /* Increased font size */
    -webkit-appearance: none; /* Prevents iOS styling */
    appearance: none;
    touch-action: manipulation; /* Improves touch response */
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .landing-header {
        padding: 15px 5%;
        flex-direction: column;
    }
    
    .landing-logo {
        margin-bottom: 15px;
    }
    
    .landing-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .landing-nav li {
        margin: 5px 10px;
    }
    
    .hero-section {
        flex-direction: column;
        padding: 50px 5%;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 40px;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        width: 90%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .about-section {
        flex-direction: column;
        text-align: center;
    }
    
    .about-content {
        max-width: 100%;
    }
    
    .about-content h2:after {
        margin: 15px auto 0;
    }
    
    .about-image {
        width: 80%;
        margin-top: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-logo, .footer-links, .footer-social {
        align-items: center;
    }
    
    .footer-links h3:after, .footer-social h3:after {
        margin: 10px auto 0;
    }
    
    .chat-header {
        padding: 10px;
    }
    
    .team-info .logo {
        width: 30px;
        height: 30px;
    }
    
    .team-details h1 {
        font-size: 16px;
    }
    
    .message {
        max-width: 85%;
    }
    
    .chat-input {
        padding: 10px;
    }
    
    .chat-input input {
        padding: 10px;
    }
    
    .chat-input button {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .landing-logo h1 {
        font-size: 20px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .team-details p {
        display: none;
    }
    
    .username {
        font-size: 14px;
        margin-right: 10px;
    }
    
    .logout-btn {
        font-size: 12px;
    }
    
    .message {
        max-width: 90%;
        padding: 8px 12px;
    }
}