:root {
    --primary-color: #0056b3;
    --primary-light: #3a7cbd;
    --primary-dark: #003d82;
    --secondary-color: #e9f2ff;
    --text-color: #333;
    --text-light: #666;
    --bot-message-bg: #f0f7ff;
    --user-message-bg: #0056b3;
    --user-message-text: white;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    position: relative;
    min-height: 100vh;
}

/* Background Image */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('kgmu.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -1;
}

.demo-title {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-dark);
}

/* Info Modal */
.info-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.info-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 500px;
    box-shadow: var(--shadow);
    position: relative;
}

.close-info {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-info:hover {
    color: black;
}

/* Chat Button & Animation Effects */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 999;
    transition: var(--transition);
}

.chat-button i {
    font-size: 24px;
}

.chat-button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* Concentric Rings Animation */
.chat-button::before,
.chat-button::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background-color: rgba(0, 86, 179, 0.3); /* Using primary color with opacity */
    z-index: -1;
    animation: pulse 2s infinite;
}

.chat-button::before {
    width: 80px;
    height: 80px;
    animation-delay: 0.5s;
}

.chat-button::after {
    width: 100px;
    height: 100px;
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Notification Cloud */
.notification-cloud {
    position: absolute;
    top: -15px;
    right: -10px;
    background-color: #FF5252;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    padding: 3px 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    z-index: 1000;
}

.notification-cloud.visible {
    opacity: 1;
    transform: scale(1);
}

/* Speech bubble shape for the cloud */
.notification-cloud::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 10px;
    width: 10px;
    height: 10px;
    background-color: #FF5252;
    transform: rotate(45deg);
    z-index: -1;
}

/* Enhanced Info Modal Styles */
.info-content {
    background-color: white;
    margin: 7% auto;
    padding: 25px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 600px;
    box-shadow: var(--shadow);
    position: relative;
}

.developer-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.profile-image-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.developer-profile h2 {
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.credentials {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 15px;
}

.developer-bio {
    margin-bottom: 25px;
    line-height: 1.6;
}

.developer-bio p {
    margin-bottom: 15px;
    text-align: justify;
}

.kgmu-quick-links {
    background-color: var(--secondary-color);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.kgmu-quick-links h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    text-align: center;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.kgmu-link {
    flex: 1 0 45%;
    padding: 10px;
    background-color: white;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--primary-color);
    text-align: center;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.kgmu-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.connect-section {
    text-align: center;
}

.connect-section h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icons a {
    font-size: 24px;
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.social-icons a:hover {
    transform: scale(1.2);
    color: var(--primary-dark);
    background-color: #d9e9ff;
}

/* Chat Container */
.chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 360px;
    height: 600px;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: var(--transition);
}

.chat-container.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Chat Header */
.chat-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    background-color: white;
    object-fit: contain;
}

.header-text h3 {
    font-size: 16px;
    margin-bottom: 2px;
}

.university-name {
    font-size: 10px;
    opacity: 0.9;
}

.header-actions {
    display: flex;
}

.action-btn {
    background: transparent;
    border: none;
    color: white;
    margin-left: 15px;
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
}

.action-btn:hover {
    transform: scale(1.1);
}

/* Chat Body */
.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.message-content {
    padding: 12px 15px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    word-wrap: break-word;
}

.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content a {
    color: var(--primary-color);
    text-decoration: underline;
    word-break: break-all;
}

.bot {
    align-self: flex-start;
}

.bot .message-content {
    background-color: var(--bot-message-bg);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
}

.user {
    align-self: flex-end;
}

.user .message-content {
    background-color: var(--user-message-bg);
    color: var(--user-message-text);
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--bot-message-bg);
    border-radius: 18px;
    max-width: 100px;
    margin-bottom: 15px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #999;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* Chat Footer */
.chat-footer {
    padding: 10px 15px;
    background-color: white;
    display: flex;
    align-items: flex-end;
    border-top: 1px solid #eee;
}

#user-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    max-height: 120px;
    overflow-y: auto;
    resize: none;
    outline: none;
    transition: var(--transition);
}

#user-input:focus {
    border-color: var(--primary-light);
}

#send-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

#send-btn:hover {
    background-color: var(--primary-dark);
}

#send-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Timer Styles */
#timer-display {
    font-size: 14px;
    color: var(--primary-dark);
    margin-right: 10px; /* Space between timer and send button */
    visibility: hidden; /* Initially hidden */
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
    padding: 10px;
}
#timer-display.active{
    visibility: visible;
    opacity: 1;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .chat-container.active {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .chat-button {
        bottom: 20px;
        right: 20px;
    }

    .info-content {
        width: 90%;
        margin: 20% auto;
    }
    
    .links-container {
        flex-direction: column;
    }
    
    .kgmu-link {
        flex: 1 0 100%;
    }
}
