:root {
    --primary-color: #847444;
    --primary-dark: #695c36;
    --primary-light: #a69666;
    --bg-color: #f8f7f4;
    --text-dark: #2c2c2c;
    --border-color: #e0dcd0;
    --error-color: #dc3545;
    --success-color: #28a745;
}

html {
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
}

body {
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #ffffff 100%);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-repeat: repeat;
    background-size: 300px;
    opacity: 0.03;
    transform: rotate(30deg);
    pointer-events: none;
    z-index: -1;
    filter: blur(8px);
    animation: backgroundFloat 15s ease-in-out infinite;
}

.login-container {
    background: #fff;
    padding: 25px 20px;
    border: 1.5px solid #e0dcd0;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1), 0 1.5px 0 #e0dcd0,
        0 -1.5px 0 #e0dcd0;
    width: 100%;
    max-width: 450px;
    margin: 0;
    height: auto;
    max-height: 98vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-logo {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 25px;
    background: linear-gradient(145deg, #ffffff, #f1f1f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 20px 20px 60px #d0d0d0, -20px -20px 60px #ffffff;
    transition: all 0.3s ease;
    overflow: hidden;
}

.brand-logo::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        145deg,
        var(--primary-color),
        var(--primary-light)
    );
    opacity: 0.1;
    z-index: 1;
}

.brand-logo::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    background: white;
    z-index: 1;
}

.brand-logo img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    padding: 5px;
}

.brand-logo:hover {
    transform: scale(1.05);
}

h2 {
    color: #333;
    text-align: center;
    margin: 0 0 5px;
    font-size: 24px;
}

.login-subtitle {
    color: #666;
    text-align: center;
    margin: 0 0 20px;
    font-size: 14px;
}

.chamber-list {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px auto;
    max-width: 500px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.chamber-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px;
    min-width: 120px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    margin: 0;
}

.chamber-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 8px;
    display: block;
}

.chamber-name {
    font-size: 12px;
    color: #333;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    white-space: normal;
    max-width: 100px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    line-height: 1.2;
    height: 2.4em;
}

.chamber-item:hover {
    transform: translateY(-2px);
    background-color: rgba(0, 0, 0, 0.05);
}

.chamber-item.selected {
    border: 2px solid #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
}

.chamber-item.locked {
    cursor: not-allowed;
    opacity: 0.7;
    position: relative;
}

.chamber-item.locked:hover {
    transform: none;
    box-shadow: none;
}

.chamber-item.locked::after {
    content: "🔒";
    position: absolute;
    top: -5px;
    right: -5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 10px;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.see-more-btn {
    background: none;
    border: 1px solid #847444;
    color: #847444;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    grid-column: span 5;
    text-align: center;
    margin-top: 10px;
}

.see-more-btn:hover {
    background-color: #847444;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.5rem;
    color: #333;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    max-height: calc(80vh - 100px);
    overflow-y: auto;
    padding-right: 10px;
}

.modal-chamber-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, 120px);
    gap: 20px;
    padding: 20px;
    justify-content: center;
    align-items: start;
    margin: 0 auto;
    max-width: 1200px;
}

@keyframes backgroundFloat {
    0% {
        transform: rotate(30deg) translateY(0);
    }
    50% {
        transform: rotate(30deg) translateY(-20px);
    }
    100% {
        transform: rotate(30deg) translateY(0);
    }
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.request-otp-btn {
    transition: all 0.3s ease;
}

.request-otp-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.request-otp-btn.disabled {
    background-color: #cccccc;
    border-color: #bbbbbb;
    color: #666666;
}

.request-otp-btn:not(:disabled):hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

.request-otp-btn[title] {
    position: relative;
}

.request-otp-btn[title]:hover:after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 5px;
    z-index: 1000;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

.sign-in-btn,
.request-otp-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.sign-in-btn {
    background-color: #847444;
    color: white;
    flex: 2;
}

.sign-in-btn:hover:not(:disabled) {
    background-color: #6a5d36;
}

.sign-in-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.sign-in-btn:disabled:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    animation: tooltip-fade-in 0.2s ease-in-out;
}

.sign-in-btn:disabled:hover::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    pointer-events: none;
    animation: tooltip-fade-in 0.2s ease-in-out;
}

.request-otp-btn {
    background-color: #f5f5f5;
    color: #847444;
    border: 1px solid #847444;
    flex: 1;
}

.request-otp-btn:hover:not(:disabled) {
    background-color: #eee;
}

.request-otp-btn:disabled {
    background-color: #f5f5f5;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.request-otp-btn:disabled:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    animation: tooltip-fade-in 0.2s ease-in-out;
}

.request-otp-btn:disabled:hover::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    pointer-events: none;
    animation: tooltip-fade-in 0.2s ease-in-out;
}

@keyframes tooltip-fade-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.login-btn {
    display: none;
}

.footer-text {
    text-align: center;
    margin-top: 20px;
}

.footer-text p {
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.footer-text a {
    color: #847444;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-text a:hover {
    color: #6a5d36;
}

.chambers-section {
    margin: 15px 0;
}

.chambers-grid {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    max-width: 200px;
    margin: 0 auto;
}

.chamber-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    flex: 0 0 auto;
}

.chamber-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chamber-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.see-more {
    background: rgba(132, 116, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
}

.otp-group {
    padding: 0;
    margin-top: 5px;
    display: flex;
    align-items: center;
    width: 100%;
}

.otp-inputs {
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: center;
    margin: 0 auto;
}

.otp-box {
    width: 45px;
    height: 45px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 24px;
    font-weight: 500;
    color: #847444;
    text-align: center;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
    cursor: text;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.otp-box::placeholder {
    color: #cccccc;
    font-size: 20px;
    font-weight: 400;
    opacity: 0.7;
}

.otp-box:focus {
    outline: none;
    border-color: #847444;
    box-shadow: 0 0 0 2px rgba(132, 116, 68, 0.1);
    background-color: #fff;
}

.otp-box.filled {
    border-color: #847444;
    background-color: #fcfaf5;
    color: #847444;
}

.otp-box::-webkit-outer-spin-button,
.otp-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    -o-appearance: none;
    appearance: none;
    margin: 0;
}

.otp-box[type="number"] {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    -ms-appearance: textfield;
    -o-appearance: textfield;
    appearance: textfield;
}

.otp-box {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.otp-hint {
    display: block;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.input-group {
    position: relative;
    margin-top: 5px;
}

.input-group:not(.otp-group) {
    display: flex;
    align-items: center;
}

.input-group:not(.otp-group) input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-group:not(.otp-group) i.fas {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #847444;
    font-size: 16px;
    z-index: 1;
    pointer-events: none;
}

.input-group input[type="email"] {
    font-size: 14px;
}

.otp-request-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.countdown-timer {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
    text-align: center;
}

.countdown-timer.active {
    display: block !important;
    animation: fadeIn 0.3s ease-in-out;
}

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

.modal-search {
    padding: 10px;
    text-align: center;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

#chamberSearch {
    width: 90%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#chamberSearch:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(132, 116, 68, 0.2);
}

.no-results {
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    color: #888;
    font-style: italic;
    background-color: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

#chamberModal .modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

body.modal-open {
    overflow: auto;
    position: static;
}

.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0;
}

.input-group.otp-group {
    padding: 10px;
}

.otp-box {
    width: 40px;
    height: 40px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: #495057;
    background: #fff;
}

.otp-box:focus {
    border-color: #847444;
    box-shadow: 0 0 0 0.2rem rgba(132, 116, 68, 0.25);
    outline: none;
}

.otp-hint {
    display: block;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 8px;
}

.notification-modal {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.notification-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 300px;
    position: relative;
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon i {
    font-size: 20px;
}

.notification-text {
    flex-grow: 1;
    min-width: 0;
}

.notification-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 100%;
    background: currentColor;
    opacity: 0.3;
    animation: progressBar 3s linear;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-content.info {
    color: #847444;
}

.notification-content.success {
    color: #28a745;
}

.notification-content.warning {
    color: #ffc107;
}

.notification-content.error {
    color: #dc3545;
}

.notification-content i {
    display: none;
}

.notification-content.info .info-icon,
.notification-content.success .success-icon,
.notification-content.warning .warning-icon,
.notification-content.error .error-icon {
    display: block;
}

.notification-content {
    animation: slideIn 0.3s ease-out;
    transform-origin: right;
}

.notification-content.hiding {
    animation: slideOut 0.3s ease-in;
}

@media (max-width: 576px) {
    .notification-modal {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .notification-content {
        width: 100%;
    }
}

.no-results-message {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9rem;
    width: 100%;
}
