* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: #2c3e50;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 35px 25px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #3498db);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-container img {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 0 10px #2ecc71);
}

header h1 {
    font-size: 3.4rem;
    color: #ffffff;
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: -0.8px;
    line-height: 1;
}

header h1:first-child {
    font-size: 3rem;
    color: #2ecc71;
    margin-bottom: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    font-weight: 800;
    position: relative;
    display: inline-block;
}

header h1:first-child::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2ecc71, transparent);
}

header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    margin-top: 12px;
    font-weight: 400;
    letter-spacing: 0.4px;
    line-height: 1.5;
}

/* About Section Styling */
.about-section {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 25px 30px;
    margin: 25px auto 35px;
    max-width: 900px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71, #3498db);
}

.about-section h3 {
    font-size: 1.8rem;
    color: #2ecc71;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.about-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    line-height: 1.6;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.main-content {
    flex-grow: 1;
    display: flex;
    gap: 24px;
}

.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar h2 {
    font-size: 1.6rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.subject-list {
    list-style: none;
}

.subject-list li {
    margin-bottom: 12px;
}

.subject-item {
    display: flex;
    gap: 8px;
    align-items: center;
}

.subject-btn {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 500;
}

.subject-btn:hover,
.subject-btn.active {
    background: rgba(46, 204, 113, 0.9);
    border-color: rgba(46, 204, 113, 0.8);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.quiz-btn {
    background: rgba(52, 152, 219, 0.9);
    color: #ffffff;
    border: none;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    min-width: 90px;
}

.quiz-btn:hover {
    background: rgba(41, 128, 185, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.chat-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex-grow: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.message {
    max-width: 78%;
    padding: 16px 22px;
    border-radius: 20px;
    position: relative;
    animation: fadeIn 0.4s ease;
    line-height: 1.5;
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.25);
}

.bot-message {
    align-self: flex-start;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #2c3e50;
    border-bottom-left-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.bot-message p {
    color: #2c3e50;
}

.message-info {
    font-size: 0.8rem;
    color: rgba(44, 62, 80, 0.6);
    margin-top: 8px;
    font-weight: 500;
}

.user-message .message-info {
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

.typing-indicator {
    align-self: flex-start;
    padding: 16px 22px;
    background: rgba(236, 240, 241, 0.8);
    border-radius: 20px;
    display: none;
    color: #7f8c8d;
    font-style: italic;
    font-weight: 500;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.chat-input {
    display: flex;
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    align-items: center;
    gap: 12px;
}

.chat-input input {
    flex-grow: 1;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    padding: 16px 24px;
    border-radius: 25px;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.chat-input input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #ffffff;
}

.chat-input input::placeholder {
    color: #95a5a6;
}

.clear-btn {
    background: #e74c3c;
    color: #ffffff;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.25);
}

.clear-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.speech-btn {
    background: #9b59b6;
    color: #ffffff;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.25);
}

.speech-btn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.3);
}

.speech-btn.listening {
    background: #e74c3c;
    animation: pulse 1.5s infinite;
}

#send-button {
    background: #2ecc71;
    color: #ffffff;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.25);
}

#send-button:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.speech-status {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 500;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(236, 240, 241, 0.5);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.5);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(41, 128, 185, 0.7);
}

/* Footer Styles */
.site-footer {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    margin-top: 40px;
    padding: 30px 25px 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    text-align: center; /* Added to center all text */
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Changed from space-around to center */
    gap: 30px;
    margin-bottom: 25px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    max-width: 300px; /* Added to limit width and improve centering */
}

.footer-section h4 {
    color: #2ecc71;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.footer-section ul {
    list-style: none;
    padding: 0; /* Added to remove default padding */
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #2ecc71;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center; /* Center social links */
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #2ecc71;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Responsive design for footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        max-width: 100%; /* Full width on mobile */
    }

    .social-links {
        justify-content: center;
    }
}