/* macOS Style Popups for Status Bar */
.macos-popup {
    position: fixed;
    top: 45px;
    /* Moved down 15px from 30px */
    /* Right below the status bar */
    right: 15px;
    width: 280px;
    background: rgba(25, 25, 25, 0.6);
    backdrop-filter: blur(30px) saturate(160%) brightness(120%);
    -webkit-backdrop-filter: blur(30px) saturate(160%) brightness(120%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    color: white;
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.macos-popup.active {
    opacity: 1;
    transform: scale(1.1);
    pointer-events: auto;
}

.cal-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.cal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Analog Clock Enhancements --- */
.analog-clock {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.4));
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: relative;
    margin-bottom: 25px;
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 10px 20px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    /* Rotate around center bottom */
    pointer-events: none;
    z-index: 5;
}

.clock-number {
    position: absolute;
    width: 20px;
    height: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hour-hand {
    width: 6px;
    height: 45px;
    margin-left: -3px;
    /* Half of width */
    background: linear-gradient(to top, #fff, #ccc);
    border-radius: 6px;
    z-index: 3;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.minute-hand {
    width: 4px;
    height: 70px;
    margin-left: -2px;
    /* Half of width */
    background: linear-gradient(to top, #fff, #aaa);
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.second-hand {
    width: 2px;
    height: 80px;
    margin-left: -1px;
    /* Half of width */
    background: #ff3b30;
    border-radius: 2px;
    z-index: 4;
}

.clock-popup {
    width: 260px;
    /* Adjusted width */
    align-items: center;
    padding: 20px;
    text-align: center;
}

.digital-time-large {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #00f2ff;
    /* Neon cyan-blue */
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.7);
    font-family: 'Digital Numbers', 'Orbitron', sans-serif !important;
    width: 100%;
}

/* Timezone selector */
.timezone-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 12px;
    outline: none;
    cursor: pointer;
    width: 200px;
}

.timezone-select option {
    background: #222;
}

/* --- Calendar Holiday Styles --- */
.calendar-day {
    height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: default;
    position: relative;
    padding: 2px;
}

.day-number {
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
}

.lunar-label {
    font-size: 9px;
    opacity: 0.6;
    margin-bottom: 2px;
    color: #ffd700;
    /* Goldish for and aesthetic look */
}

.calendar-day.today {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white !important;
    font-weight: bold;
    border-radius: 10px;
    /* Rounded square glass look */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.calendar-day.today .lunar-label {
    color: rgba(255, 255, 255, 0.9);
}

.calendar-day.holiday {
    color: #ffd700 !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    position: relative;
}

.holiday-tooltip {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: #ffd700;
    white-space: nowrap;
    opacity: 0.9;
    font-weight: bold;
}

/* Date/Calendar Popup Styles */
.calendar-popup {
    width: 300px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
    font-size: 13px;
}

.day-name {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}

.calendar-day {
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: default;
    position: relative;
    font-size: 16px;
}

.calendar-day.today {
    background: #007aff;
    color: white;
    font-weight: bold;
}

.calendar-day.other-month {
    color: rgba(255, 255, 255, 0.2);
}



/* Clickable Status Items */
.status-item.clickable {
    cursor: pointer;
    transition: opacity 0.2s;
    padding: 2px 6px;
    border-radius: 4px;
}

.status-item.clickable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.status-item.clickable:active {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Advertising Icon Modals --- */

/* Advertising Modal Overlay */
.ad-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ad-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Advertising Modal Window */
.ad-modal-window {
    width: 90%;
    max-width: 500px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ad-modal-overlay.active .ad-modal-window {
    transform: scale(1) translateY(0);
}

/* Window Header */
.ad-window-header {
    height: 38px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

.window-controls {
    position: absolute;
    left: 12px;
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.control.red {
    background: #ff5f57;
    border: 1px solid #e0443e;
    cursor: pointer;
}

.control.yellow {
    background: #febc2e;
    border: 1px solid #dba520;
}

.control.green {
    background: #28c840;
    border: 1px solid #1aab29;
}

.control.red:hover {
    background: #ff4845;
}

.window-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
}

/* Body Content */
.ad-window-body {
    padding: 20px;
    color: white;
    max-height: 80vh;
    overflow-y: auto;
}

/* Demo Content Styles */
.profile-demo,
.business-demo,
.entertainment-demo,
.product-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Profile Specific */
.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.profile-header h2 {
    margin: 5px 0;
    font-size: 24px;
}

.profile-role {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 14px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    width: 100%;
    justify-content: space-around;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Digital Numbers', 'Orbitron', sans-serif !important;
    font-size: 18px;
    background: #000000;
    color: #00f2ff;
    padding: 2px 10px;
    border-radius: 8px;
    border: 1px solid #1a1a1a;
    box-shadow:
        inset 0 0 5px rgba(0, 242, 255, 0.2),
        0 0 8px rgba(0, 0, 0, 0.5);
    text-shadow:
        0 0 4px rgba(0, 242, 255, 0.8),
        0 0 8px rgba(0, 242, 255, 0.4);
    text-align: center;
    letter-spacing: 2px;
}

.stat-label {
    font-size: 11px;
    opacity: 0.6;
}

/* Business Specific */
.hero-icon {
    width: 60px;
    margin-bottom: 15px;
}

.business-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
}

.biz-option {
    background: rgba(255, 255, 255, 0.08);
    padding: 12px;
    border-radius: 10px;
    text-align: left;
    transition: background 0.2s;
}

.biz-option h4 {
    margin: 0 0 5px 0;
    color: #ffd700;
}

.biz-option p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.biz-option:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Entertainment Specific */
.poster-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    margin-bottom: 15px;
}

.poster-item {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 5px;
}

.event-card {
    background: linear-gradient(90deg, #ff6b6b, #ee5253);
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    margin-top: 10px;
}

.event-card h4 {
    margin: 0;
}

.event-card p {
    margin: 5px 0 0 0;
    font-size: 12px;
}

/* Product Specific */
.product-spotlight {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.product-img-large {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: white;
    /* fallback */
    padding: 5px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.product-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.price {
    color: #2ecc71;
    font-weight: bold;
    font-size: 18px;
    margin: 5px 0;
}

.old-price {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    margin-left: 5px;
}

.desc {
    font-size: 13px;
    opacity: 0.7;
    margin: 5px 0 10px 0;
}

.related-products {
    display: flex;
    gap: 10px;
    width: 100%;
}

.mini-prod {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
}

/* Buttons */
.action-btn,
.buy-btn {
    margin-top: 20px;
    padding: 10px 25px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
    transition: transform 0.1s, background 0.2s;
}

.action-btn:hover,
.buy-btn:hover {
    background: #0062cc;
    transform: translateY(-2px);
}

.buy-btn {
    background: #34c759;
    box-shadow: 0 4px 10px rgba(52, 199, 89, 0.3);
}

.buy-btn:hover {
    background: #28a745;
}

/* Wallpaper Grid Styles */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px;
}

.wallpaper-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    /* Reset global styles */
    margin: 0 !important;
    display: block;
    max-width: none !important;
    max-height: none !important;
}

.wallpaper-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: #00d2ff;
    z-index: 2;
}

.wallpaper-thumb:active {
    transform: scale(0.95);
}

/* Responsive adjustment for mobile */
@media screen and (max-width: 480px) {

    .digital-time-large,
    .calendar-day.holiday {
        text-shadow: none !important;
    }
}