/* Global Typography */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    background-color: var(--spark-light);
    color: var(--spark-dark);
    font-weight: var(--font-weight-normal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.02em;
}

.lead {
    font-family: var(--font-primary);
    font-weight: 300;
}

/* Main content should take up available space */
.container-fluid,
.container {
    flex: 1 0 auto;
}

/* Gradient animation keyframes */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes navbarSlideIn {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modern Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--navbar-primary-color, #356ee7) 0%, var(--navbar-secondary-color, #173aaa) 50%, var(--navbar-primary-color, #356ee7) 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite, navbarSlideIn 0.8s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
    min-height: 50px;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

/* Ensure header banners appear BELOW the navbar, not behind it */
.banner-wrapper {
    padding-top: 56px;
    /* Height of navbar-spark */
}

.header-banner,
[class*="header-banner"],
.employees-hero-spark,
.geog-hero-spark {
    position: relative;
    z-index: 1;
    margin-top: 0;
}

/* When banner-wrapper is empty, don't add extra space */
.banner-wrapper:empty {
    padding-top: 0;
}

@media (max-width: 991.98px) {
    .navbar {
        background: linear-gradient(135deg, var(--navbar-primary-color, #356ee7) 0%, var(--navbar-secondary-color, #173aaa) 100%);
        background-size: 100% 100%;
        animation: navbarSlideIn 0.8s ease-out;
    }
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: 1.5rem;
    font-weight: var(--font-weight-medium);
    transition: transform 0.3s ease;
}

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

.navbar-brand img {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.user-info {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    margin-right: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: var(--font-weight-normal);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.user-info i {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.user-info .nickname {
    font-weight: var(--font-weight-medium);
    margin-right: 0.5rem;
    letter-spacing: 0.02em;
    color: white;
}

.logout-btn {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn {
    font-family: var(--font-primary);
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
}

.btn-primary {
    background-color: var(--spark-primary);
    border-color: var(--spark-primary);
}

.btn-primary:hover {
    background-color: var(--spark-secondary);
    border-color: var(--spark-secondary);
}

/* Form Controls */
.form-control,
.form-select {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-normal);
}

/* Navigation Links */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: var(--font-weight-medium);
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: 30px;
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    font-size: 0.9rem;
    margin: 0 0.2rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link i {
    margin-right: 0.5rem;
    opacity: 0.8;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

/* Search Icon Styles */
.search-section {
    display: flex;
    align-items: center;
}

.search-icon {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: var(--font-weight-medium);
    padding: 0.5rem 0.8rem !important;
    border-radius: 50px;
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.search-icon:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-icon i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.search-icon:hover i {
    transform: scale(1.1);
}

.navbar-nav .nav-link:hover i {
    transform: scale(1.1);
    opacity: 1;
}

.navbar-nav .nav-link.active {
    color: white !important;
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
    position: relative;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    opacity: 0.9;
    transform: scaleX(1);
    transition: transform 0.2s ease;
}

.navbar-nav .nav-link.active i {
    opacity: 1;
}

/* Navbar toggler for mobile */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.navbar-toggler::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.navbar-toggler:hover::before {
    width: 100%;
    height: 100%;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    position: relative;
    z-index: 1;
}

/* Smooth collapse animation */
.navbar-collapse {
    transition: all 0.3s ease-in-out;
}

.navbar-collapse.collapsing {
    transition: height 0.3s ease;
}

/* Notification styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-header {
    font-weight: var(--font-weight-semibold);
    color: var(--spark-dark);
    padding: 0.75rem 1rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: rgba(53, 110, 231, 0.05);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: rgba(53, 110, 231, 0.1);
    color: var(--spark-dark);
}

.nav-link.dropdown-toggle::after {
    display: none;
}

.nav-link.dropdown-toggle {
    padding: 0.35rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.nav-link.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Enhanced notification styles */
.notifications-dropdown {
    min-width: 340px !important;
    padding: 0;
    max-height: 450px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: none;
    animation: dropdown-fade 0.2s ease-out;
    margin-top: 10px !important;
    scrollbar-width: thin;
}

.notifications-dropdown::-webkit-scrollbar {
    width: 6px;
}

.notifications-dropdown::-webkit-scrollbar-track {
    background: #f8fafc;
}

.notifications-dropdown::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 6px;
}

@keyframes dropdown-fade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-header {
    background-color: #f8fafc;
    background-image: linear-gradient(to right, #f8fafc, #f1f5f9);
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.notifications-header h6 {
    margin: 0;
    font-weight: var(--font-weight-semibold);
    color: var(--spark-dark);
    font-size: 1rem;
}

.mark-all-read {
    font-size: 0.8rem;
    padding: 6px 10px;
    color: var(--spark-primary);
    border-radius: 6px;
    font-weight: var(--font-weight-medium);
    transition: all 0.2s ease;
}

.mark-all-read:hover {
    background: rgba(53, 110, 231, 0.1);
    transform: translateY(-1px);
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background-color: rgba(53, 110, 231, 0.05);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background-color: var(--spark-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notification-item:hover::after {
    opacity: 1;
}

.notification-item.clicked {
    background-color: rgba(53, 110, 231, 0.08);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background-color: rgba(53, 110, 231, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--spark-primary);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.notification-item:hover .notification-icon {
    transform: scale(1.05);
}

.notification-content {
    line-height: 1.4;
    padding-left: 5px;
}

.notification-message {
    margin-bottom: 4px;
    font-weight: var(--font-weight-medium);
    color: var(--spark-dark);
    font-size: 0.9rem;
}

.notification-time {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
}

.notification-time::before {
    content: '•';
    display: inline-block;
    margin-right: 4px;
    font-size: 1.2em;
    line-height: 0;
    color: #94a3b8;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
    font-size: 0.7rem;
    padding: 0.25rem 0.45rem;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(220, 38, 38, 0.25);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.notification-bell {
    font-size: 1.15rem;
    color: white;
    transition: transform 0.3s ease;
}

@keyframes bell-shake {
    0% {
        transform: rotate(0);
    }

    15% {
        transform: rotate(15deg);
    }

    30% {
        transform: rotate(-15deg);
    }

    45% {
        transform: rotate(8deg);
    }

    60% {
        transform: rotate(-8deg);
    }

    75% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(0);
    }
}

.notification-bell.has-new {
    animation: bell-shake 1s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.empty-notifications {
    padding: 30px 15px;
    text-align: center;
    color: #64748b;
}

.empty-notifications p {
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: 10px;
}

.empty-notifications i {
    font-size: 2.5rem;
    color: #e2e8f0;
    margin-bottom: 15px;
    display: block;
}

/* Navbar Success Animation */
@keyframes navbarSuccess {
    0% {
        background: linear-gradient(135deg, var(--spark-primary) 0%, var(--spark-secondary) 100%);
    }

    5% {
        background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    }

    85% {
        background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    }

    100% {
        background: linear-gradient(135deg, var(--spark-primary) 0%, var(--spark-secondary) 100%);
    }
}

.navbar.success-flash {
    animation: navbarSuccess 5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1200px) {
    .navbar-brand {
        margin-right: 1rem;
    }
}

@media (max-width: 991.98px) {
    .navbar {
        padding: var(--spacing-2) var(--spacing-4);
    }

    .navbar-collapse {
        padding: var(--spacing-4);
        margin: 0;
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 70px);
    }

    .navbar-nav {
        padding: 0;
        margin-bottom: 0;
        order: 1;
    }

    .navbar-nav .nav-link {
        padding: 1rem 1.25rem;
        margin: 0.5rem 0;
        color: rgba(255, 255, 255, 0.85) !important;
        background: transparent;
        border: none;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: var(--font-weight-normal);
        transition: all 0.2s ease;
    }

    .navbar-nav .nav-link:hover {
        color: rgba(255, 255, 255, 0.95) !important;
        background: rgba(255, 255, 255, 0.1);
        transform: none;
        box-shadow: none;
    }

    .navbar-nav .nav-link.active {
        color: var(--spark-primary) !important;
        background: white;
        font-weight: var(--font-weight-medium);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .navbar-nav .nav-link.active::after {
        display: none;
    }

    .navbar-nav .nav-link.active i {
        color: var(--spark-primary);
    }

    .navbar-nav .nav-link i {
        margin-right: 1rem;
        font-size: 1.25rem;
        width: 24px;
        text-align: center;
        opacity: 1;
    }

    .navbar-nav .nav-item {
        margin: 0;
    }

    .user-section {
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
        gap: 0;
        order: 3;
        margin-top: auto;
        position: relative;
    }

    .user-section::before {
        content: '';
        position: absolute;
        top: -0.5rem;
        left: 1.25rem;
        right: 1.25rem;
        height: 1px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 1px;
    }

    /* Notification in mobile - move to order 2 */
    .dropdown.me-3 {
        margin-right: 0 !important;
        width: 100%;
        order: 2;
        margin-bottom: var(--spacing-4);
    }

    .nav-link.dropdown-toggle {
        width: 100%;
        padding: 1rem 1.25rem;
        margin: 0.5rem 0;
        color: rgba(255, 255, 255, 0.85) !important;
        background: transparent;
        border: none;
        border-radius: 12px;
        height: auto;
        justify-content: flex-start;
        transition: all 0.2s ease;
    }

    .nav-link.dropdown-toggle:hover {
        color: rgba(255, 255, 255, 0.95) !important;
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-link.dropdown-toggle i.notification-bell {
        font-size: 1.25rem;
        margin-right: 1rem;
        width: 24px;
        text-align: center;
    }

    .notification-text {
        display: inline;
        font-size: 1rem;
    }

    .notification-badge {
        position: static;
        transform: none;
        margin-left: 0.5rem;
    }

    .notifications-dropdown {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        min-width: 100% !important;
        margin-top: 0 !important;
        border-radius: 12px;
    }

    .user-info {
        margin: 0.5rem 0;
        padding: 1rem 1.25rem;
        color: rgba(255, 255, 255, 0.85) !important;
        background: transparent;
        border: none;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: var(--font-weight-normal);
        justify-content: flex-start;
        transition: all 0.2s ease;
        order: 1;
    }

    .user-info:hover {
        color: rgba(255, 255, 255, 0.95) !important;
        background: rgba(255, 255, 255, 0.1);
        transform: none;
    }

    .user-info i {
        font-size: 1.25rem;
        margin-right: 1rem;
        width: 24px;
        text-align: center;
    }

    .admin-link {
        margin: 0 !important;
        width: 100%;
        order: 2;
    }

    .admin-link .nav-link {
        padding: 1rem 1.25rem;
        margin: 0.5rem 0;
        color: rgba(255, 255, 255, 0.85) !important;
        background: transparent;
        border: none;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: var(--font-weight-normal);
        justify-content: flex-start;
        transition: all 0.2s ease;
    }

    .admin-link .nav-link:hover {
        color: rgba(255, 255, 255, 0.95) !important;
        background: rgba(255, 255, 255, 0.1);
        transform: none;
        box-shadow: none;
    }

    .admin-link .nav-link::after {
        content: 'Administration';
        font-size: 1rem;
    }

    .admin-link .nav-link i {
        font-size: 1.25rem;
        margin-right: 1rem;
        width: 24px;
        text-align: center;
    }

    .logout-form {
        width: 100%;
        margin: 0;
        order: 3;
    }

    .logout-btn {
        padding: 1rem 1.25rem;
        margin: 0.5rem 0;
        color: rgba(255, 255, 255, 0.85);
        background: transparent;
        border: none;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: var(--font-weight-normal);
        justify-content: flex-start;
        transition: all 0.2s ease;
    }

    .logout-btn:hover {
        color: rgba(255, 255, 255, 0.95);
        background: rgba(255, 255, 255, 0.1);
        transform: none;
        box-shadow: none;
    }

    .logout-btn i {
        font-size: 1.25rem;
        margin-right: 1rem;
        width: 24px;
        text-align: center;
    }

    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 0.25rem;
        background: transparent;
    }

    .navbar-toggler::before {
        display: none;
    }

    .navbar-toggler:hover {
        background: transparent;
        transform: none;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
        outline: 0;
    }
}

.footer {
    background: linear-gradient(135deg, var(--spark-primary) 0%, var(--spark-secondary) 100%);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-top: auto;
    /* Changed from 3rem to auto to push to bottom */
    padding: 1rem 0;
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    /* Prevent footer from shrinking */
}

/* Sleep Mode Button */
.sleep-mode-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sleep-mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.sleep-mode-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
}

body.sleep-mode-open {
    overflow: hidden;
}

/* Sleep Mode Screen */
.sleep-mode-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sleep-mode-screen[hidden] {
    display: none;
}

.sleep-mode-screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Background image with sliding animation */
.sleep-mode-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("/static/images/backgrounds/spark-bg-sleep.f703203bbded.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.2);
    animation: slideAndFill 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    z-index: 1;
}

/* Dark overlay for better text visibility */
.sleep-mode-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.5) 100%);
    opacity: 0;
    animation: fadeIn 1s 0.5s forwards;
    z-index: 2;
}

@keyframes slideAndFill {
    0% {
        opacity: 0;
        transform: scale(1.2) translateY(50px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.sleep-mode-content {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 3;
    opacity: 0;
    transform: translateY(30px);
    animation: contentFadeIn 1s 0.8s forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sleep-mode-screen.is-closing .sleep-mode-content {
    opacity: 0;
    transform: translateY(30px);
}

.sleep-mode-meta {
    position: absolute;
    right: 0;
    bottom: 40px;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 1.5rem;
}

.sleep-mode-exit {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    opacity: 0;
    animation: fadeIn 1.5s 1.5s forwards;
    z-index: 3;
    max-width: 32rem;
}

.sleep-mode-author {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    opacity: 0;
    animation: fadeIn 1.5s 2s forwards;
    z-index: 3;
    max-width: 32rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Decorative elements - subtle particles */
.sleep-mode-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    animation: floatAndFade 8s infinite ease-in-out;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    right: 10%;
    animation-delay: 2s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    top: 40%;
    right: 15%;
    animation-delay: 4s;
}

.circle-4 {
    width: 80px;
    height: 80px;
    bottom: 30%;
    left: 15%;
    animation-delay: 6s;
}

@keyframes floatAndFade {

    0%,
    100% {
        opacity: 0;
        transform: translateY(0) scale(0.8);
    }

    50% {
        opacity: 0.3;
        transform: translateY(-20px) scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sleep-mode-meta {
        bottom: 20px;
        gap: 8px;
    }

    .sleep-mode-exit {
        font-size: 0.875rem;
    }

    .sleep-mode-author {
        font-size: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sleep-mode-btn,
    .sleep-mode-screen::before,
    .sleep-mode-screen::after,
    .sleep-mode-content,
    .sleep-mode-exit,
    .sleep-mode-author,
    .circle {
        animation: none !important;
        transition: none !important;
    }

    .sleep-mode-screen::before,
    .sleep-mode-screen::after,
    .sleep-mode-content,
    .sleep-mode-exit,
    .sleep-mode-author {
        opacity: 1;
        transform: none;
    }

    .circle {
        opacity: 0.18;
        transform: none;
    }
}
