﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    color: #333;
}

.hidden {
    display: none !important;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #0077b6;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-links a {
    margin-left: 25px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #0077b6;
}

.hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, #0077b6, #00b4d8);
    color: #fff;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 25px;
}

.search-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.search-bar input {
    width: 400px;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    outline: none;
}

.search-bar button {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    background: #023e8a;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: #03045e;
}

.doctors-section, .services-section {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.doctors-section h2, .services-section h2 {
    font-size: 26px;
    margin-bottom: 25px;
    color: #023e8a;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.doctor-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
}

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.doctor-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #0077b6;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    margin: 0 auto 15px;
}

.doctor-card h3 {
    font-size: 17px;
    margin-bottom: 6px;
}

.specialty {
    color: #0077b6;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.rating {
    color: #f59e0b;
    font-size: 14px;
    margin-bottom: 5px;
}

.fee {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.book-btn {
    padding: 10px 25px;
    border: 2px solid #0077b6;
    background: transparent;
    color: #0077b6;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.book-btn:hover {
    background: #0077b6;
    color: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.service-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.07);
}

.service-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.service-card p {
    color: #666;
    font-size: 14px;
}

footer {
    text-align: center;
    padding: 25px;
    background: #023e8a;
    color: #fff;
    margin-top: 40px;
    font-size: 14px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    padding: 35px;
    border-radius: 15px;
    text-align: center;
    width: 350px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #023e8a;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-content input:focus {
    border-color: #0077b6;
}

.error-text {
    color: #e63946;
    font-size: 13px;
    min-height: 20px;
    margin-bottom: 10px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.modal-buttons button {
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-buttons button:first-child {
    background: #0077b6;
    color: #fff;
}

.modal-buttons button:first-child:hover {
    background: #023e8a;
}

.modal-buttons button:last-child {
    background: #e0e0e0;
    color: #333;
}

.modal-buttons button:last-child:hover {
    background: #ccc;
}

#chatScreen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #e5ddd5;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #075e54;
    color: #fff;
    gap: 12px;
}

.back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
}

.chat-header-info {
    flex: 1;
}

.chat-header-info h3 {
    font-size: 16px;
    font-weight: 600;
}

.user-badge {
    font-size: 12px;
    opacity: 0.85;
}

.idle-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.msg {
    max-width: 65%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.msg.sent {
    align-self: flex-end;
    background: #dcf8c6;
    border-top-right-radius: 2px;
}

.msg.received {
    align-self: flex-start;
    background: #fff;
    border-top-left-radius: 2px;
}

.msg .time {
    display: block;
    font-size: 11px;
    color: #999;
    text-align: right;
    margin-top: 4px;
}

.msg.read .time::after {
    content: ' \2713\2713';
    color: #075e54;
}

.chat-input-area {
    display: flex;
    padding: 10px 15px;
    background: #f0f0f0;
    gap: 10px;
    align-items: center;
}

#messageInput {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

#sendBtn {
    padding: 12px 22px;
    border: none;
    border-radius: 25px;
    background: #075e54;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#sendBtn:hover {
    background: #064e46;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 3px;
}
