Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 71 additions & 1 deletion css/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,74 @@ body {
height: 28px;
border-width: 2px;
}
}
}

/* Theme button tooltips */

.theme-btn {
position: relative;
}

/* Tooltip text */
.theme-btn::after {
content: attr(data-tooltip);
position: absolute;
top: 50%;
right: 120%;
transform: translateY(-50%) translateX(-8px);
background: rgba(0, 0, 0, 0.85);
color: #fff;
padding: 6px 10px;
border-radius: 6px;
font-family: 'Montserrat', sans-serif;
font-weight: 400;
font-size: 0.8rem;
letter-spacing: 0.2px;
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease, transform 0.25s ease;
z-index: 2000;
}

/* Tooltip arrow */
.theme-btn::before {
content: "";
position: absolute;
top: 50%;
right: 110%;
transform: translateY(-50%);
border-width: 6px;
border-style: solid;
border-color: transparent transparent transparent rgba(0, 0, 0, 0.85);
opacity: 0;
transition: opacity 0.25s ease;
}

/* Show tooltip on hover */
.theme-btn:hover::after {
opacity: 1;
transform: translateY(-50%) translateX(-12px);
}

.theme-btn:hover::before {
opacity: 1;
}

/* Theme-aware tooltip colors */
body.theme-sunset .theme-btn::after,
body.theme-default .theme-btn::after {
background: rgba(0, 0, 0, 0.85);
color: #fff;
}

body.theme-night .theme-btn::after {
background: rgba(255, 255, 255, 0.9);
color: #111;
border: 1px solid rgba(0, 0, 0, 0.15);
}

/* White tooltip arrow for night theme */
body.theme-night .theme-btn::before {
border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
}
11 changes: 6 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ <h1>Game Over!</h1>
<div id="score">0</div>

<!-- Theme Buttons -->
<div id="theme-controls">
<button id="theme-default" class="theme-btn active" title="Default Theme">πŸŒ…</button>
<button id="theme-night" class="theme-btn" title="Night Theme">πŸŒ™</button>
<button id="theme-sunset" class="theme-btn" title="Sunset Theme">πŸŒ‡</button>
</div>
<div id="theme-controls">
<button id="theme-default" class="theme-btn active" data-tooltip="Default Theme">πŸŒ…</button>
<button id="theme-night" class="theme-btn" data-tooltip="Night Theme">πŸŒ™</button>
<button id="theme-sunset" class="theme-btn" data-tooltip="Sunset Theme">πŸŒ‡</button>
</div>


<!-- Include Three.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
Expand Down
Loading