/* Support Assistant Modal */
.support-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 460px; /* Increased by 25% from 368px */
    height: auto;
    min-height: 525px; /* Increased by 25% from 420px */
    max-height: 656px; /* Increased by 25% from 525px */
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
                0 5px 15px rgba(0, 0, 0, 0.2),
                0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateY(200%);
    transition: transform 0.5s ease;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.support-modal.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.5s ease, opacity 0.5s ease, visibility 0s linear;
}

.support-modal.hidden {
    transform: translateY(200%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s ease, opacity 0.5s ease, visibility 0s linear 0.5s;
}

.support-header {
    background: #004700;
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Dark theme - red accent for header */
[data-theme="dark"] .support-header {
    background: #8B0000;
}

.support-avatar {
    width: 35px;
    height: 35px;
    background: #003600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .support-avatar {
    background: #5B0000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.support-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.support-info {
    flex: 1;
}

.support-name {
    font-weight: bold;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7);
    transition: all 0.3s ease;
}

[data-theme="dark"] .live-indicator {
    background: #ff6b6b;
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
}

.live-indicator.typing {
    animation: pulse-fast 1s infinite;
    background: #ffff00;
    box-shadow: 0 0 0 0 rgba(255, 255, 0, 0.7);
}

[data-theme="dark"] .live-indicator.typing {
    background: #ff9999;
    box-shadow: 0 0 0 0 rgba(255, 153, 153, 0.7);
}

.live-indicator.offline {
    animation: none;
    background: #666;
    box-shadow: none;
}

[data-theme="dark"] .live-indicator.offline {
    background: #5B0000;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(0, 255, 0, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0);
    }
}

[data-theme="dark"] .live-indicator {
    animation: pulse-red 2s infinite;
}

[data-theme="dark"] .live-indicator.typing {
    animation: pulse-fast-red 1s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

@keyframes pulse-fast {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 255, 0, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(255, 255, 0, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 255, 0, 0);
    }
}

@keyframes pulse-fast-red {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 153, 153, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(255, 153, 153, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(255, 153, 153, 0);
    }
}

.support-status {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.support-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.support-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Support Toggle Button */
.support-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #004700;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 71, 0, 0.3);
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .support-toggle {
    background: #8B0000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.support-toggle:hover {
    background: #003600;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 71, 0, 0.4);
}

[data-theme="dark"] .support-toggle:hover {
    background: #A52A2A;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.support-toggle.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.support-toggle.show {
    display: flex;
}

.support-content {
    padding: 15px;
    background: #f5f5f5; /* Light gray background for better readability */
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    margin-bottom: 15px;
    min-height: 313px; /* Increased by 25% from 250px */
    max-height: 438px; /* Increased by 25% from 350px */
}

.message {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
    gap: 10px;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background: #004700;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .message-avatar {
    background: #5B0000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.message.user .message-avatar {
    background: #666;
}

[data-theme="dark"] .message.user .message-avatar {
    background: #8B0000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 12px 16px;
    border-radius: 20px;
    border-bottom-left-radius: 6px;
    max-width: 75%;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.5;
    font-size: 14px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 
                0 1px 3px rgba(0, 0, 0, 0.1),
                inset 0 1px 1px rgba(255, 255, 255, 0.8);
    position: relative;
    color: #2c2c2c;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.message-content a {
    color: #4285F4;
    text-decoration: underline;
    font-weight: 500;
    transition: all 0.2s ease;
}

.message-content a:hover {
    color: #3367d6;
    text-decoration: underline;
    text-shadow: 0 1px 2px rgba(66, 133, 244, 0.3);
}

.message.user .message-content {
    background: linear-gradient(135deg, #005a00 0%, #004700 100%);
    color: white;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 6px;
    box-shadow: 0 3px 8px rgba(0, 71, 0, 0.3), 
                0 1px 3px rgba(0, 0, 0, 0.2),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 90, 0, 0.3);
}

.message.user .message-content a {
    color: #87CEEB;
    text-decoration: underline;
    font-weight: 500;
    transition: all 0.2s ease;
}

.message.user .message-content a:hover {
    color: #B0E0E6;
    text-decoration: underline;
    text-shadow: 0 1px 2px rgba(135, 206, 235, 0.4);
}

/* Dark theme support modal adjustments */
[data-theme="dark"] .support-modal {
    background: linear-gradient(135deg, rgba(25, 10, 10, 0.97) 0%, rgba(30, 15, 15, 0.97) 100%);
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7),
                0 8px 25px rgba(0, 0, 0, 0.5),
                0 3px 10px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 0, 0, 0.3);
}

[data-theme="dark"] .support-content {
    background: linear-gradient(135deg, rgba(35, 15, 15, 0.95) 0%, rgba(40, 20, 20, 0.95) 100%);
}

[data-theme="dark"] .message-content {
    background: linear-gradient(135deg, rgba(60, 35, 35, 0.95) 0%, rgba(45, 25, 25, 0.95) 100%);
    color: #f0d0d0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 
                0 1px 3px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(139, 0, 0, 0.2);
}

[data-theme="dark"] .message-content a {
    color: #87CEEB;
    text-decoration: underline;
    font-weight: 500;
    transition: all 0.2s ease;
}

[data-theme="dark"] .message-content a:hover {
    color: #B0E0E6;
    text-decoration: underline;
    text-shadow: 0 1px 2px rgba(135, 206, 235, 0.4);
}

[data-theme="dark"] .message.user .message-content {
    background: linear-gradient(135deg, #B22222 0%, #8B0000 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 
                0 1px 3px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(220, 20, 20, 0.3);
}

[data-theme="dark"] .message.user .message-content a {
    color: #87CEEB;
    text-decoration: underline;
    font-weight: 500;
    transition: all 0.2s ease;
}

[data-theme="dark"] .message.user .message-content a:hover {
    color: #B0E0E6;
    text-decoration: underline;
    text-shadow: 0 1px 2px rgba(135, 206, 235, 0.4);
}

[data-theme="dark"] .chat-input {
    background: rgba(40, 20, 20, 0.9);
    border-color: rgba(139, 0, 0, 0.3);
    color: #f0d0d0;
}

[data-theme="dark"] .chat-input::placeholder {
    color: rgba(255, 150, 150, 0.5);
}

[data-theme="dark"] .chat-input:focus {
    border-color: rgba(178, 34, 34, 0.6);
}

[data-theme="dark"] .typing-dots {
    background: linear-gradient(135deg, rgba(60, 35, 35, 0.95) 0%, rgba(45, 25, 25, 0.95) 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 
                0 1px 3px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 0, 0, 0.2);
}

[data-theme="dark"] .typing-dot {
    background: #d08080;
}

/* Typing Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 12px 16px;
    border-radius: 20px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 
                0 1px 3px rgba(0, 0, 0, 0.1),
                inset 0 1px 1px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Message Animation */
.message {
    opacity: 0;
    transform: translateY(10px);
    animation: messageSlideIn 0.3s ease forwards;
}

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

.support-message {
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: #004700;
}

.send-button {
    background: #004700;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.send-button:hover {
    background: #003600;
}

/* Dark theme - red send button */
[data-theme="dark"] .send-button {
    background: #8B0000;
}

[data-theme="dark"] .send-button:hover {
    background: #B22222;
}

.chat-messages {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 8px;
}

.message.user {
    flex-direction: row-reverse;
}

.message-content {
    background: #f0f0f0;
    padding: 10px 14px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 75%;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.5;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.user .message-content {
    background: #004700;
    color: white;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 4px;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background: #003600;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.user .message-avatar {
    background: #004700;
    overflow: hidden;
}

.user .message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-button {
    background: #004700;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    transition: background-color 0.3s ease;
    display: none;
}

.theme-button.show {
    display: block;
    margin-top: 10px;
}

.theme-button:hover {
    background: #003600;
}

/* Dark theme - red theme button when shown */
[data-theme="dark"] .theme-button {
    background: #8B0000;
}

[data-theme="dark"] .theme-button:hover {
    background: #B22222;
}

/* Memory Clear Button */
.memory-clear-button {
    background: #666;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    width: 100%;
    font-size: 12px;
    transition: background-color 0.3s ease;
    margin-top: 8px;
    opacity: 0.7;
}

.memory-clear-button:hover {
    background: #555;
    opacity: 1;
}

/* Back Button */
.back-button {
    position: fixed;
    top: 20px;
    right: 90px;  /* Offset to avoid theme switcher */
    z-index: 1000;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: "Times New Roman", Times, serif;
    font-size: 15px;
    font-weight: 300;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-button:hover {
    color: #3d3d3d;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

[data-theme="dark"] .back-button {
    color: #fff;
}

[data-theme="dark"] .back-button:hover {
    color: #d1d1d1;
}

/* Theme Switch Link - Gothic "Night" text */
.theme-switch-link {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    font-family: "UnifrakturMaguntia", "Old English Text MT", "Blackletter", serif;
    font-size: 15px;
    font-weight: 300;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 0.5px;
    display: none; /* Hidden by default in light theme */
}

.theme-switch-link:hover {
    color: #3d3d3d;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

/* Show "Night" only in dark theme */
[data-theme="dark"] .theme-switch-link {
    display: block;
    color: #fff;
}

[data-theme="dark"] .theme-switch-link:hover {
    color: #d1d1d1;
}

/* Theme Switcher - visible when dark theme is active (OLD STYLE - DEPRECATED) */
.theme-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    color: white;
    font-size: 18px;
}

[data-theme="dark"] .theme-switch {
    display: block;
}

.theme-switch:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Base theme (light) */
:root {
    --bg-color: #fff;
    --text-color: #000;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --primary-color: #004700;
    --secondary-color: #003600;
    --accent-color: #006400;
}

/* Default light theme styles */
body {
    background-color: #fff !important;
    color: #000 !important;
}

.video-background {
    display: none !important;
}

/* Dark Theme - only applied when explicitly set */
[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #fff;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --primary-color: #004700;
    --secondary-color: #003600;
    --accent-color: #006400;
}

[data-theme="dark"] body {
    background-color: #1a1a1a !important;
    color: #fff !important;
}

[data-theme="dark"] .video-background {
    display: block !important;
}

/* Video Background */
.video-background {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

[data-theme="dark"] .video-background {
    display: block;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

/* Content Adjustments */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .container {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive scaling for different resolutions */
/* FullHD: 1920x1080 - Base size */
@media (min-width: 1920px) and (max-width: 2559px) {
    .support-modal {
        width: 460px;
        min-height: 525px;
        max-height: 656px;
    }
    .chat-messages {
        min-height: 313px;
        max-height: 438px;
    }
}

/* 2K: 2560x1440 - Scale up 15% */
@media (min-width: 2560px) and (max-width: 3839px) {
    .support-modal {
        width: 529px;
        min-height: 604px;
        max-height: 754px;
        font-size: 16px;
    }
    .chat-messages {
        min-height: 360px;
        max-height: 504px;
    }
    .message-content {
        font-size: 16px;
        padding: 14px 18px;
    }
    .support-name {
        font-size: 16px;
    }
    .support-status {
        font-size: 14px;
    }
}

/* 4K: 3840x2160 - Scale up 30% */
@media (min-width: 3840px) {
    .support-modal {
        width: 598px;
        min-height: 683px;
        max-height: 853px;
        font-size: 18px;
    }
    .chat-messages {
        min-height: 407px;
        max-height: 569px;
    }
    .message-content {
        font-size: 18px;
        padding: 16px 20px;
    }
    .support-name {
        font-size: 18px;
    }
    .support-status {
        font-size: 16px;
    }
    .chat-input {
        font-size: 16px;
    }
    .send-button {
        font-size: 16px;
    }
    .theme-switch {
        padding: 12px 21px;
        border-radius: 28px;
        font-size: 21px;
    }
    .support-toggle {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}

/* Advertisement Widget */
.ad-widget {
    position: fixed;
    z-index: 9999;
    width: 300px;
    height: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    animation: fadeInBounce 0.8s ease forwards;
}

.ad-widget-link {
    display: block;
    cursor: pointer;
    position: relative;
}

.ad-widget-link:hover {
    transform: scale(1.05);
}

.ad-widget img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ad-widget-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: #ff4444;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 26px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    z-index: 10000;
}

.ad-widget-close:hover {
    background: #cc0000;
    transform: scale(1.1);
}

@keyframes fadeInBounce {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    60% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Corner positions */
.ad-widget.top-left {
    top: 20px;
    left: 20px;
}

.ad-widget.top-right {
    top: 20px;
    right: 20px;
}

.ad-widget.bottom-left {
    bottom: 20px;
    left: 20px;
}

.ad-widget.bottom-right {
    bottom: 20px;
    right: 20px;
}

/* Theme switcher and back button responsive scaling */
@media (min-width: 1920px) and (max-width: 2559px) {
    .theme-switch {
        padding: 10px 18px;
        font-size: 18px;
    }
    .back-button {
        font-size: 15px;
    }
    .support-toggle {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

@media (min-width: 2560px) and (max-width: 3839px) {
    .theme-switch {
        padding: 11px 20px;
        border-radius: 27px;
        font-size: 20px;
    }
    .back-button {
        font-size: 17px;
    }
    .support-toggle {
        width: 65px;
        height: 65px;
        font-size: 26px;
    }
}

@media (min-width: 3840px) {
    .back-button {
        font-size: 19px;
    }
}

