:root {
    --ivory: #E8E3DC;
    --antique-rose: #C8A39E;
    --deep-emerald: #1E4938;
    --aged-gold: #B69E71;
    --charcoal: #333333;
    --light-gold: #D9C9A3;
    --bg-texture: #F5F3EE;
}

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

body {
    background: linear-gradient(135deg, var(--bg-texture) 0%, #F0EDE6 100%);
    font-family: 'Inter', sans-serif;
    color: var(--charcoal);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before, body::after {
    content: "";
    position: fixed;
    width: 200px;
    height: 200px;
    background: url('../assets/images/conner.png') no-repeat center/contain;
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
}

body::before { 
    top: 20px; 
    left: 20px; 
}

body::after { 
    top: 20px; 
    right: 20px; 
    transform: rotate(90deg); 
}

.page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 15px;
}

.container {
    position: relative;
    z-index: 10;
    max-width: 550px;
    width: 100%;
    padding: 40px 30px;
    background: white;
    border: 1px solid var(--aged-gold);
    border-radius: 24px;
    min-height: 950px;
    margin: 40px auto;
}

.container::before, .container::after {
    content: "";
    position: fixed;
    width: 200px;
    height: 200px;
    background: url('../assets/images/conner.png') no-repeat center/contain;
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
}

.container::before { 
    bottom: 20px; 
    left: 20px; 
    transform: rotate(-90deg); 
}

.container::after { 
    bottom: 20px; 
    right: 20px; 
    transform: rotate(180deg); 
}

.header {
    text-align: center;
    margin-bottom: 15px;
}

.header h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 32px;
    color: var(--deep-emerald);
    margin-bottom: 5px;
    letter-spacing: 5px;
    transform: scaleY(1.1);
}

.header p {
    font-size: 13px;
    color: var(--antique-rose);
    margin: 1px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header .location {
    font-size: 12px;
    color: #6c6c6c;
    margin-top: 2px;
    letter-spacing: 0.6px;
}

.center-decoration {
    width: 200px;
    height: 60px;
    background: url('../assets/images/center.png') no-repeat center/contain;
    margin: 2px auto;
    opacity: 0.8;
}

.language-toggle {
    display: block;
    width: 220px;
    padding: 14px 0;
    background-color: var(--deep-emerald);
    color: var(--ivory);
    border: none;
    border-radius: 30px;
    font-size: 16px;
    text-align: center;
    margin: 12px auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
    cursor: pointer;
    font-weight: 500;
}

.language-toggle:hover { 
    background-color: #1a4232; 
}

.language-toggle:active { 
    transform: scale(0.98); 
}

.language-toggle span {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.language-toggle span.active {
    opacity: 1;
    font-weight: 600;
}

.main-content {
    background-color: white;
    border: 1px solid var(--aged-gold);
    border-radius: 15px;
    padding: 25px;
    margin: 35px 0;
}

.message-box {
    border-radius: 15px;
    padding: 16px;
    margin-bottom: 45px;
    min-height: 300px;
    max-height: 300px;
    overflow-y: auto;
}

.chat-message {
    margin: 12px 0;
    display: flex;
    align-items: flex-start;
    animation: messageSlide 0.5s ease-out;
}

.chat-message.user { 
    justify-content: flex-end; 
}

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

.message-content {
    max-width: 90%;
    padding: 18px 22px;
    border-radius: 15px;
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    line-height: 1.4;
}

.message-content.ai {
    background: #F5F1F2;
    color: var(--charcoal);
    border: 1px solid #ebe7e8;
    border-radius: 12px 12px 12px 3px;
}

.message-content.user {
    background: var(--deep-emerald);
    color: white;
    border-radius: 12px 12px 3px 12px;
}

.message-content.success {
    background: linear-gradient(135deg, #f8cfd5, var(--light-gold));
    color: var(--charcoal);
    border: 1px solid #f8cfd5;
    text-align: center;
    font-weight: 500;
}

.message-content.thinking {
    background: #f5e6e8;
    border: 1px dashed #e8d5d7;
    opacity: 0.8;
    font-style: italic;
}

.message-image {
    margin-top: 10px;
    text-align: center;
}

.message-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    object-fit: contain;
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 15px;
}

.service-card {
    background-color: white;
    border: 1px solid var(--aged-gold);
    border-radius: 12px;
    padding: 16px 14px;
    text-align: center;
    transition: transform 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 55px;
    position: relative;
}

.service-card::before {
    content: "";
    position: absolute;
    inset: 0.5px;
    border: 0.5px solid rgba(235, 206, 202, 0.959);
    border-radius: 5px;
    pointer-events: none;
}

.service-card:hover { 
    transform: translateY(-1px); 
}

.service-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 400;
    color: var(--charcoal);
    line-height: 1.3;
}

.input-area {
    display: flex;
    margin-top: 79px;
    align-items: center;
    background: white;
    border: 1px solid var(--aged-gold);
    border-radius: 25px;
    padding: 6px 6px 6px 22px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input-area:focus-within {
    border-color: var(--deep-emerald);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 2px rgba(30, 73, 56, 0.1);
}

.text-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 12px;
    font-size: 16px;
    color: var(--charcoal);
}

.text-input::placeholder {
    color: #999;
    opacity: 0.7;
    font-style: italic;
}

.send-button {
    background-color: var(--deep-emerald);
    color: white;
    border: none;
    border-radius: 20px;
    width: 65px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.send-button:hover { 
    background-color: #1a4232; 
}

.send-button:active { 
    transform: scale(0.95); 
}

.loader {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid var(--aged-gold);
    border-radius: 50%;
    border-top-color: var(--deep-emerald);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin { 
    to { 
        transform: rotate(360deg); 
    } 
}

.message-box::-webkit-scrollbar { 
    width: 4px; 
}

.message-box::-webkit-scrollbar-track { 
    background: transparent; 
}

.message-box::-webkit-scrollbar-thumb { 
    background: var(--aged-gold); 
    border-radius: 2px; 
    opacity: 0.7; 
}

.message-box::-webkit-scrollbar-thumb:hover { 
    background: var(--deep-emerald); 
}

@media (max-width: 360px) {
    .container { 
        max-width: 320px; 
        padding: 20px 15px; 
        margin: 15px auto; 
    }
    
    .header h1 { 
        font-size: 20px; 
    }
    
    body::before, body::after, .container::before, .container::after { 
        width: 150px; 
        height: 150px; 
    }
}

.casual-chat-wrapper {
    text-align: center;
    margin: 15px 0 10px 0;
    padding: 0 20px;
}

.casual-chat-btn {
    display: inline-block;
    padding: 12px 35px;
    background-color: #f8f9fa;
    border: 1.5px solid #3d5a4c;
    border-radius: 25px;
    color: #3d5a4c;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.casual-chat-btn:hover {
    background-color: #3d5a4c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 90, 76, 0.2);
}

.casual-chat-btn:active {
    transform: translateY(0);
}

.casual-chat-btn .btn-text {
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .casual-chat-btn {
        padding: 10px 28px;
        font-size: 14px;
    }
}

/* ==================== CALENDAR STYLES ==================== */

.page-container.with-calendar {
    display: flex;
    max-width: 1600px;
    width: 100%;
    padding: 20px;
    gap: 25px;
    align-items: flex-start;
}

.calendar-panel {
    flex: 0 0 58%;
    background: white;
    border: 1px solid var(--aged-gold);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
}

.page-container.with-calendar .container {
    flex: 0 0 38%;
    margin: 0;
}

.calendar-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gold);
    flex-wrap: wrap;
    gap: 10px;
}

.calendar-title-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: var(--deep-emerald);
    margin: 0;
    letter-spacing: 2px;
}

.calendar-title-section p {
    font-size: 13px;
    color: var(--antique-rose);
    margin: 3px 0 0 0;
}

.calendar-view-toggle {
    display: flex;
    gap: 5px;
    background: var(--bg-texture);
    border-radius: 10px;
    padding: 4px;
}

.calendar-view-btn {
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: var(--charcoal);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.calendar-view-btn.active {
    background: white;
    color: var(--deep-emerald);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.calendar-view-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.6);
}

.calendar-nav-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

.calendar-nav-btn {
    padding: 8px 15px;
    border: 1.5px solid var(--deep-emerald);
    background: white;
    color: var(--deep-emerald);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.calendar-nav-btn:hover {
    background: var(--deep-emerald);
    color: white;
    transform: translateY(-1px);
}

.calendar-nav-btn.today {
    background: var(--deep-emerald);
    color: white;
}

.calendar-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-texture);
    border-radius: 12px;
    flex-wrap: wrap;
}

.calendar-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-filter-item label {
    font-weight: 600;
    color: var(--deep-emerald);
    font-size: 13px;
}

.calendar-filter-item select {
    padding: 8px 12px;
    border: 1px solid var(--aged-gold);
    border-radius: 8px;
    background: white;
    color: var(--charcoal);
    font-size: 13px;
    cursor: pointer;
    min-width: 140px;
    font-family: 'Inter', sans-serif;
}

.calendar-current-date {
    text-align: center;
    padding: 12px 0;
    margin-bottom: 15px;
}

.calendar-current-date h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--deep-emerald);
    margin: 0;
    letter-spacing: 1px;
}

.calendar-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day-col {
    background: var(--ivory);
    border-radius: 12px;
    padding: 12px;
    min-height: 400px;
    border: 1px solid var(--light-gold);
    transition: all 0.3s;
}

.calendar-day-col:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.calendar-day-head {
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--aged-gold);
    margin-bottom: 12px;
}

.calendar-day-name {
    font-size: 11px;
    color: var(--antique-rose);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.8px;
}

.calendar-day-num {
    font-size: 18px;
    font-weight: bold;
    color: var(--deep-emerald);
    margin-top: 3px;
}

.calendar-day-head.is-today {
    background: var(--deep-emerald);
    border-radius: 8px;
    padding: 8px;
    border-bottom: none;
}

.calendar-day-head.is-today .calendar-day-name,
.calendar-day-head.is-today .calendar-day-num {
    color: white;
}

.calendar-class-item {
    background: white;
    border-left: 4px solid var(--deep-emerald);
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.calendar-class-item:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.calendar-class-time {
    font-size: 11px;
    color: #666;
    font-weight: 700;
}

.calendar-class-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal);
    margin: 4px 0;
    line-height: 1.3;
    font-family: 'Playfair Display', serif;
}

.calendar-class-instructor {
    font-size: 11px;
    color: var(--antique-rose);
    margin: 3px 0;
}

.calendar-class-spots {
    font-size: 10px;
    margin-top: 5px;
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 600;
}

.calendar-class-spots.available {
    background: #d4edda;
    color: #155724;
}

.calendar-class-spots.low {
    background: #fff3cd;
    color: #856404;
}

.calendar-class-spots.full {
    background: #f8d7da;
    color: #721c24;
}

.calendar-no-classes {
    text-align: center;
    padding: 40px 10px;
    color: #999;
    font-style: italic;
    font-size: 12px;
}

.calendar-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-month-day {
    background: white;
    border: 1px solid var(--light-gold);
    border-radius: 8px;
    padding: 8px;
    min-height: 85px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.calendar-month-day:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.calendar-month-day.other-month {
    opacity: 0.3;
}

.calendar-month-day.is-today {
    border: 2px solid var(--deep-emerald);
    background: var(--ivory);
}

.calendar-month-day-num {
    font-weight: bold;
    color: var(--deep-emerald);
    margin-bottom: 6px;
    font-size: 13px;
}

.calendar-mini-class {
    background: var(--deep-emerald);
    color: white;
    padding: 3px 5px;
    margin-bottom: 3px;
    border-radius: 3px;
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-class-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--antique-rose);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
}

.calendar-loading-state {
    text-align: center;
    padding: 50px 20px;
}

.calendar-spinner {
    border: 3px solid var(--light-gold);
    border-top: 3px solid var(--deep-emerald);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.calendar-modal.show {
    display: flex;
}

.calendar-modal-box {
    background: white;
    border: 2px solid var(--aged-gold);
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-modal-head {
    padding: 20px 25px;
    border-bottom: 2px solid var(--light-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-modal-head h3 {
    font-family: 'Playfair Display', serif;
    color: var(--deep-emerald);
    margin: 0;
    font-size: 22px;
}

.calendar-modal-close {
    border: none;
    background: none;
    font-size: 28px;
    color: var(--antique-rose);
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.calendar-modal-close:hover {
    color: var(--deep-emerald);
    transform: rotate(90deg);
}

.calendar-modal-body {
    padding: 25px;
    font-family: 'Inter', sans-serif;
    color: var(--charcoal);
}

.calendar-modal-body > div {
    margin-bottom: 12px;
    line-height: 1.6;
}

.calendar-modal-body strong {
    color: var(--deep-emerald);
}

.calendar-modal-foot {
    padding: 15px 25px;
    border-top: 1px solid var(--light-gold);
}

.calendar-book-btn {
    width: 100%;
    padding: 14px;
    background: var(--deep-emerald);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.calendar-book-btn:hover {
    background: #1a4232;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 73, 56, 0.3);
}

.calendar-book-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ==================== RESPONSIVE STYLES ==================== */

@media (max-width: 1400px) {
    .page-container.with-calendar {
        gap: 20px;
    }
    
    .calendar-panel {
        flex: 0 0 55%;
    }
    
    .page-container.with-calendar .container {
        flex: 0 0 42%;
    }
}

@media (max-width: 1200px) {
    .page-container.with-calendar {
        flex-direction: column;
    }
    
    .calendar-panel,
    .page-container.with-calendar .container {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .calendar-week-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .calendar-week-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-month-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .calendar-header-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-nav-bar {
        flex-wrap: wrap;
    }
    
    .calendar-filter-bar {
        flex-direction: column;
    }
    
    .calendar-filter-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-filter-item select {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .calendar-week-grid,
    .calendar-month-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-title-section h2 {
        font-size: 22px;
    }
}

/* ==================== SCROLLBAR STYLES ==================== */

.calendar-panel::-webkit-scrollbar,
.calendar-modal-box::-webkit-scrollbar {
    width: 6px;
}

.calendar-panel::-webkit-scrollbar-track,
.calendar-modal-box::-webkit-scrollbar-track {
    background: var(--bg-texture);
    border-radius: 3px;
}

.calendar-panel::-webkit-scrollbar-thumb,
.calendar-modal-box::-webkit-scrollbar-thumb {
    background: var(--aged-gold);
    border-radius: 3px;
}

.calendar-panel::-webkit-scrollbar-thumb:hover,
.calendar-modal-box::-webkit-scrollbar-thumb:hover {
    background: var(--antique-rose);
}