/* INSOMNIA HUB Main Portal Custom Styles */

.hide {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

/* Login Card Glassmorphism Styles */
.login-section {
    width: 100%;
    max-width: 440px;
    margin: 20px auto 0 auto;
    animation: fade-in-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 24px 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition-smooth);
}

@media (max-width: 480px) {
    .login-card {
        padding: 20px 16px;
        border-radius: 12px;
    }
}

.login-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: 0 25px 60px rgba(139, 92, 246, 0.1), 0 0 1px 1px rgba(139, 92, 246, 0.2);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-sub);
    letter-spacing: 0.3px;
    margin-left: 2px;
}

.form-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--color-text-main);
    font-family: var(--font-outfit);
    font-size: 0.95rem;
    line-height: 1.4;
    min-height: 38px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.login-error-msg {
    font-size: 0.75rem;
    color: #f87171;
    font-weight: 500;
    text-align: left;
    margin-top: 2px;
    margin-bottom: 6px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fade-in-up 0.3s ease-out forwards;
}

.login-error-msg::before {
    content: "⚠️";
    font-size: 0.8rem;
}

.login-submit-btn {
    width: 100%;
    background: var(--color-neon-purple);
    border: none;
    color: #ffffff;
    padding: 9px 24px;
    min-height: 38px;
    border-radius: 8px;
    font-family: var(--font-outfit);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-submit-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.login-submit-btn:active {
    transform: translateY(0);
}

/* Main Area Layout */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 50px 80px 50px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
}

#main_title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 30%, #c084fc 70%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

#main_description {
    font-size: 1.15rem;
    color: var(--color-text-sub);
    font-weight: 300;
}

/* Services horizontal section */
.services-section {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-container {
    width: 100%;
    position: relative;
    border-radius: 24px;
    padding: 10px 0;
}

/* Scroller component */
.scroller {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 25px 0;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    container-type: scroll-state;
    position: relative;
}

.scroller::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Safari and Chrome */
}

/* Sentinels at the edge to enable smooth snap scrolling paddings */
.sentinel-left, .sentinel-right {
    flex: 0 0 1px;
    width: 1px;
}

/* Card components */
.card {
    flex: 0 0 360px;
    height: 480px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    scroll-snap-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Card body & details */
.card-image-wrapper {
    width: 100%;
    height: 230px;
    position: relative;
    overflow: hidden;
    background-color: #12121e;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 40%, rgba(9, 9, 14, 0.85) 100%);
    z-index: 1;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
    backdrop-filter: blur(8px);
}

.active-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.soon-badge {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    z-index: 2;
}

.card-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 10px;
    transition: var(--transition-smooth);
    background: linear-gradient(to right, #ffffff, #e9d5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--color-text-sub);
    line-height: 1.6;
    margin-bottom: auto;
    font-weight: 300;
    word-break: keep-all;
}

.card-action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-neon-purple);
    margin-top: 20px;
    transition: var(--transition-smooth);
}

.card-action.disabled {
    color: var(--color-text-sub);
    opacity: 0.6;
}

.arrow-icon {
    width: 18px;
    height: 18px;
    transition: var(--transition-smooth);
}

/* Card hover animation */
.card.active-service:hover {
    transform: translateY(-8px);
    background: var(--color-surface-hover);
    border-color: var(--color-border-hover);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15), 0 0 1px 1px rgba(139, 92, 246, 0.3);
}

.card.active-service:hover .card-image {
    transform: scale(1.08);
}

.card.active-service:hover .card-title {
    background: linear-gradient(to right, #ffffff, var(--color-neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card.active-service:hover .card-action {
    color: #a78bfa;
}

.card.active-service:hover .arrow-icon {
    transform: translateX(5px);
}

/* Coming Soon Style */
.card.coming-soon-service {
    opacity: 0.7;
    cursor: default;
}

.card.coming-soon-service:hover {
    transform: translateY(-2px);
    opacity: 0.85;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Arrow buttons */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(20, 20, 35, 0.7);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    opacity: 0;
    visibility: hidden;
}

.nav-button svg {
    width: 24px;
    height: 24px;
}

.prev-button {
    left: -25px;
}

.next-button {
    right: -25px;
}

.carousel-container:hover .nav-button {
    opacity: 1;
    visibility: visible;
}

.nav-button:hover {
    background: var(--color-neon-purple);
    border-color: var(--color-neon-purple);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
    color: white;
}

.nav-button:disabled {
    opacity: 0.25 !important;
    cursor: not-allowed;
    background: rgba(20, 20, 35, 0.3);
    border-color: var(--color-border);
}

/* Scroll progress bar */
.scroll-progress-container {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.scroll-progress-bar {
    position: absolute;
    height: 100%;
    width: 0%;
    left: 0;
    top: 0;
    background: linear-gradient(to right, var(--color-neon-blue), var(--color-neon-purple));
    border-radius: 3px;
    transition: width 0.1s ease-out;
}

/* Entrance Animations */
.title-animation {
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.subtitle-animation {
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

/* Media Queries for responsive layout */
@media (max-width: 1024px) {
    .main-content {
        padding: 20px 30px 60px 30px;
    }
    #main_title {
        font-size: 2.8rem;
    }
    .card {
        flex: 0 0 320px;
        height: 450px;
    }
    .card-image-wrapper {
        height: 200px;
    }
}

@media (max-width: 768px) {
    #main_title {
        font-size: 2.3rem;
    }
    #main_description {
        font-size: 0.95rem;
    }
    .card {
        flex: 0 0 280px;
        height: 420px;
    }
    .card-image-wrapper {
        height: 180px;
    }
    .nav-button {
        display: none !important; /* Hide arrows on mobile touch screens */
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    color: var(--color-text-sub);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Noto Sans KR', sans-serif;
    letter-spacing: 0.3px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: 'Noto Sans KR', sans-serif;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
