html, body {
	padding: 0;
	margin: 0;
	overflow: hidden;
	height: 100%;
}

body {
	background: #000000;
	color: white;
}

html, body, canvas {
	touch-action-delay: none;
	touch-action: none;
}

canvas, .c3htmlwrap {
	position: absolute;
}

.c3htmlwrap {
	contain: strict;
}

.c3overlay {
	pointer-events: none;
}

.c3htmlwrap[interactive] > * {
	pointer-events: auto;
}

/* HACK - work around elements being selectable only in iOS WKWebView for some reason */
html[ioswebview] .c3htmlwrap,
html[ioswebview] canvas {
	-webkit-user-select: none;
	user-select: none;
}

html[ioswebview] .c3htmlwrap > * {
	-webkit-user-select: auto;
	user-select: auto;
}

#notSupportedWrap {
	margin: 2em auto 1em auto;
	width: 75%;
	max-width: 45em;
	border: 2px solid #aaa;
	border-radius: 1em;
	padding: 2em;
	background-color: #f0f0f0;
	font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
	color: black;
}

#notSupportedTitle {
	font-size: 1.8em;
}

.notSupportedMessage {
	font-size: 1.2em;
}

.notSupportedMessage em {
	color: #888;
}

/* bbcode styles */
.bbCodeH1 {
	font-size: 2em;
	font-weight: bold;
}

.bbCodeH2 {
	font-size: 1.5em;
	font-weight: bold;
}

.bbCodeH3 {
	font-size: 1.25em;
	font-weight: bold;
}

.bbCodeH4 {
	font-size: 1.1em;
	font-weight: bold;
}

.bbCodeItem::before {
	content: " • ";
}

/* For text icons converted to HTML: size the height to the line height
   preserving the aspect ratio. Also add position: relative as that allows
   just adding a 'top' style for the iconoffsety style. */
.c3-text-icon {
	height: 1em;
	width: auto;
	position: relative;
}

/* screen reader text */
.c3-screen-reader-text {
	position: absolute;
	width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

/* --- Birthday Mod Styles --- */

.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #ff6b6b;
    border-radius: 30px;
    padding: 10px 20px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: bold;
    color: #ff6b6b;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.music-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.05);
}

.music-btn.playing {
    background: #ff6b6b;
    color: white;
    border-color: white;
}

.gift-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); /* Soft white/grey */
    z-index: 10000; /* Above everything */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    /* Glassmorphism check */
    backdrop-filter: blur(10px);
}

.gift-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    max-width: 90%;
    width: 500px;
    animation: fadeIn 1s ease;
}

.gift-title {
    font-family: 'Courier New', monospace; /* Typewriter feel */
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.gift-message {
    font-family: 'Segoe UI', sans-serif;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.gift-box-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.gift-hint {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.hint-sub {
    font-size: 0.8em;
    color: #999;
    font-style: italic;
}

#passwordInput {
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    width: 80%;
    font-size: 1.1em;
    margin-bottom: 15px;
    outline: none;
    transition: border 0.3s;
    text-align: center;
}

#passwordInput:focus {
    border-color: #ff6b6b;
}

#unlockBtn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.2s;
}

#unlockBtn:hover {
    transform: translateY(-2px);
    background: #ff5252;
}

.error-msg {
    color: #ff6b6b;
    margin-top: 10px;
    font-size: 0.9em;
    height: 20px; /* prevent layout jump */
}

.birthday-video {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 
    40% {transform: translateY(-20px);} 
    60% {transform: translateY(-10px);} 
}

.error-shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
