/* Custom styles for the login page */
body {
    background-color: #f8f9fa;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-container {
    min-height: 100vh;
}

.login-left {
    background-color: var(--bs-dark-bg-subtle);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative; /* For absolute positioning of language dropdown */
}

.login-right {
    position: relative;
    overflow: hidden;
}

.contact-us-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 8px 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-us-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.login-form-container {
    padding: 40px;
    border-radius: 3px;
    max-width: 400px;
    margin: 0 auto;
}

.login-logo {
    margin-bottom: 2rem;
}

.form-control {
    border-radius: 4px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.btn-login {
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    width: 100%;
    margin-top: 1rem;
}

.btn-login:hover {
    background-color: #0099cc;
    color: white;
}

.animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.floating-element {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.3); /* Increased opacity */
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
    z-index: 1; /* Ensure elements are visible */
}

/* Eye-like elements */
.eye-element {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.4) 60%, rgba(0, 0, 0, 0) 70%);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.7);
    animation: pulse 3s infinite alternate;
    z-index: 2; /* Ensure eyes are above floating elements */
}

.eye-pupil {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: look 8s infinite ease-in-out;
}

.eye-highlight {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 25%;
    left: 20%;
    animation: twinkle 5s infinite alternate;
}

/* Neural network connections */
.connection {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.3); /* Increased opacity */
    transform-origin: 0 0;
    z-index: 0; /* Ensure connections are below elements but still visible */
    height: 2px !important; /* Make connections more visible */
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(5deg);
    }
    50% {
        transform: translateY(10px) translateX(-15px) rotate(10deg);
    }
    75% {
        transform: translateY(-15px) translateX(-10px) rotate(5deg);
    }
    100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    100% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    }
}

@keyframes look {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    25% {
        transform: translate(-30%, -50%);
    }
    50% {
        transform: translate(-50%, -30%);
    }
    75% {
        transform: translate(-70%, -50%);
    }
}

@keyframes twinkle {
    0% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Input group styling */
.input-group {
    width: 100%;
}

.input-group-text {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

/* Responsive adjustments for specific breakpoints */

/* Custom breakpoint for 1000px to 1199px - Adjust column ratios */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .login-left {
        width: 41.666667% !important; /* Bootstrap col-5 equivalent */
        max-width: 41.666667% !important;
        flex: 0 0 41.666667% !important;
    }
    
    .login-right {
        width: 58.333333% !important; /* Bootstrap col-7 equivalent */
        max-width: 58.333333% !important;
        flex: 0 0 58.333333% !important;
    }
}

/* Large screens 1200px+ - Keep original proportions */
@media (min-width: 1200px) {
    .login-left {
        width: 33.333333% !important; /* Bootstrap col-4 equivalent */
        max-width: 33.333333% !important;
        flex: 0 0 33.333333% !important;
    }
    
    .login-right {
        width: 66.666667% !important; /* Bootstrap col-8 equivalent */
        max-width: 66.666667% !important;
        flex: 0 0 66.666667% !important;
    }
}

/* Medium screens and below - Hide right panel */
@media (max-width: 991.98px) {
    .login-right {
        display: none !important;
    }

    .login-left {
        padding: 2rem 1rem;
        position: relative; /* For absolute positioning of language dropdown */
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .login-form-container {
        max-width: 100%;
    }
}

.ai-detection-system {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.detect-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 2s ease;
}

/* 사람 아이콘 위치 */
.detect-icon.person:nth-child(1) {
    top: 25%;
    left: 20%;
    animation: moveAround1 15s ease-in-out infinite;
}

.detect-icon.person:nth-child(2) {
    top: 60%;
    left: 15%;
    animation: moveAround2 18s ease-in-out infinite;
}

.detect-icon.person:nth-child(3) {
    top: 45%;
    right: 25%;
    animation: moveAround3 20s ease-in-out infinite;
}

/* 불꽃 아이콘 위치 */
.detect-icon.fire:nth-child(4) {
    top: 30%;
    right: 40%;
    animation: moveAround4 22s ease-in-out infinite;
}

.detect-icon.fire:nth-child(5) {
    bottom: 30%;
    left: 35%;
    animation: moveAround5 17s ease-in-out infinite;
}

.detect-icon i {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.5s ease;
    z-index: 2;
}

/* 사람 아이콘 */
.detect-icon.person i {
    color: rgba(255, 255, 255, 0.8);
}

.detect-icon.person:hover i {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* 불꽃 아이콘 */
.detect-icon.fire i {
    color: rgba(255, 100, 100, 0.8);
}

.detect-icon.fire:hover i {
    color: rgba(255, 50, 50, 1);
    transform: scale(1.1);
}

/* 말풍선 스타일 */
.speech-bubble {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* 말풍선 꼬리 */
.speech-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.95);
}

/* 말풍선 표시 상태 */
.detect-icon.show-bubble .speech-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* 탐지 박스 */
.detection-box {
    position: absolute;
    width: 80px;
    height: 100px;
    border: 2px solid transparent;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
}

/* AI ON 상태에서만 탐지 - 사람 아이콘 (초록색) */
.ai-system-on .detect-icon.person .detection-box {
    border-color: #00ff96;
    opacity: 1;
}

.ai-system-on .detect-icon.person .detection-box::before,
.ai-system-on .detect-icon.person .detection-box::after {
    opacity: 1;
}

.ai-system-on .detect-icon.person i {
    color: #00ff96;
}

/* AI ON 상태에서만 탐지 - 불꽃 아이콘 (빨간색) */
.ai-system-on .detect-icon.fire .detection-box {
    border-color: #ff4444;
    opacity: 1;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.ai-system-on .detect-icon.fire .detection-box::before,
.ai-system-on .detect-icon.fire .detection-box::after {
    opacity: 1;
}

.ai-system-on .detect-icon.fire i {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.8);
}

/* AI 상태 표시 */
.ai-status {
    position: absolute;
    top: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #666;
    transition: all 0.3s ease;
}

.ai-status.ai-on .status-indicator {
    background: #00ff96;
    box-shadow: 0 0 8px rgba(0, 255, 150, 0.6);
    animation: statusBlink 2s ease-in-out infinite;
}

/* SmartOKO 로고 이미지 */
.smartoko-img-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.1);
    font-size: 120px;
    font-weight: bold;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    opacity: 0.4;
}

/* 아이콘 움직임 애니메이션 */
@keyframes moveAround1 {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(50px, -30px);
    }
    50% {
        transform: translate(30px, 40px);
    }
    75% {
        transform: translate(-20px, 20px);
    }
}

@keyframes moveAround2 {
    0%, 100% {
        transform: translate(0, 0);
    }
    30% {
        transform: translate(-40px, -20px);
    }
    60% {
        transform: translate(60px, -40px);
    }
    90% {
        transform: translate(20px, 30px);
    }
}

@keyframes moveAround3 {
    0%, 100% {
        transform: translate(0, 0);
    }
    20% {
        transform: translate(-30px, 50px);
    }
    40% {
        transform: translate(-60px, -30px);
    }
    80% {
        transform: translate(40px, 20px);
    }
}

@keyframes moveAround4 {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(-45px, -25px);
    }
    50% {
        transform: translate(35px, 55px);
    }
    75% {
        transform: translate(25px, -35px);
    }
}

@keyframes moveAround5 {
    0%, 100% {
        transform: translate(0, 0);
    }
    33% {
        transform: translate(55px, -20px);
    }
    66% {
        transform: translate(-35px, -45px);
    }
}

/* 상태 표시등 깜빡임 */
@keyframes statusBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.login-form-container form .form-control {
    border: 1px solid #00c9ff;
    border-left: 0;
}

.login-form-container form .input-group-text {
    background-color: rgba(70, 90, 126, 0.4);
    border: 1px solid #00c9ff;
    color: #00c9ff;
    border-right: 0;
    font-size: 24px;
}

.brand-bg {
    background: #00d4ff;
    color: white;
}

.brand-color {
    color: #00d4ff;
}


/* Enhanced Cookie Banner Styles for Thailand and Singapore Compliance */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    background: var(--custom-surface);
    border: 1px solid var(--custom-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--custom-shadow);
    padding: 20px;
    padding-top: 35px; /* Extra padding for close button */
    z-index: 9999;
    color: var(--custom-text);
    font-size: 14px;
    line-height: 1.5;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-banner.hide {
    transform: translateY(100px);
    opacity: 0;
}

.cookie-banner-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--custom-text);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.cookie-banner-close:hover {
    background: var(--custom-hover);
    color: var(--custom-text);
}

.cookie-banner-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--custom-text);
}

.cookie-banner-text {
    margin-bottom: 15px;
    color: var(--custom-text-muted);
}

.cookie-banner-links {
    margin: 1rem 0;
    text-align: center;
}

.cookie-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    margin: 0 1rem;
    font-weight: 500;
}

.cookie-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: stretch;
}

.cookie-banner-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    width: 100%;
}

.cookie-banner-btn.accept {
    background: var(--primary-color);
    color: white;
}

.cookie-banner-btn.accept:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.cookie-banner-btn.essential {
    background: var(--bs-secondary, #6c757d);
    border-color: var(--bs-secondary, #6c757d);
    color: white;
}

.cookie-banner-btn.essential:hover {
    background: var(--bs-secondary, #6c757d);
    border-color: var(--bs-secondary, #6c757d);
    opacity: 0.9;
}

.cookie-banner-btn.ignore {
    background: transparent;
    color: var(--custom-text-muted);
    border: 1px solid var(--custom-border);
}

.cookie-banner-btn.ignore:hover {
    background: var(--custom-hover);
    color: var(--custom-text);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
        padding: 15px;
        padding-top: 30px; /* Extra padding for close button on mobile */
        font-size: 13px;
    }

    .cookie-banner-close {
        top: 6px;
        right: 6px;
        font-size: 16px;
        width: 22px;
        height: 22px;
    }

    .cookie-banner-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .cookie-banner-text {
        margin-bottom: 12px;
        line-height: 1.4;
    }

    .cookie-banner-links {
        margin: 0.5rem 0;
    }

    .cookie-link {
        display: block;
        margin: 0.5rem 0;
        text-align: center;
    }

    .cookie-banner-buttons {
        flex-direction: column;
        gap: 0.5rem;
        justify-content: stretch;
    }

    .cookie-banner-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }
}
