/* Authentic Manga/Anime Style Digital Clock */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(180deg, 
        #0a0a1a 0%, 
        #1a1a3a 20%, 
        #0d0d2d 50%, 
        #050515 80%, 
        #000008 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Arial Black', 'Impact', sans-serif;
    overflow: hidden;
    position: relative;
}

/* Anime-style background stars */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 160px 120px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkleStars 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkleStars {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

/* Authentic Manga Speech Bubble */
.speech-bubble {
    background: linear-gradient(145deg, #ff4444, #cc0000);
    padding: 15px 40px;
    border-radius: 30px;
    position: relative;
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.6),
        0 0 40px rgba(255, 0, 0, 0.3),
        inset 0 -3px 10px rgba(0, 0, 0, 0.3),
        inset 0 3px 10px rgba(255, 255, 255, 0.2);
    animation: bubblePulse 2s ease-in-out infinite;
    border: 3px solid #ff6666;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(145deg, #ff4444, #cc0000);
    border: 3px solid #ff6666;
    border-bottom: none;
    border-right: none;
    transform: translateX(-50%) rotate(45deg);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #cc0000;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));
}

.bubble-text {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 8px;
    text-shadow: 
        2px 2px 0 #000,
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 100, 100, 0.8),
        0 0 30px rgba(255, 50, 50, 0.6);
    animation: textGlow 1.5s ease-in-out infinite alternate;
}

@keyframes bubblePulse {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.02) translateY(-2px); }
}

@keyframes textGlow {
    0% { text-shadow: 2px 2px 0 #000, 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(255,100,100,0.8); }
    100% { text-shadow: 2px 2px 0 #000, 0 0 20px rgba(255,255,255,1), 0 0 40px rgba(255,100,100,1), 0 0 60px rgba(255,50,50,0.8); }
}

/* Main digital clock with anime styling */
.digital-clock {
    background: linear-gradient(145deg, #1a1a2e, #0a0a1a);
    padding: 40px 60px;
    border-radius: 25px;
    border: 5px solid #3a3a5a;
    box-shadow: 
        0 0 0 5px #2a2a4a,
        0 0 50px rgba(100, 100, 255, 0.4),
        0 0 100px rgba(100, 50, 255, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        inset 0 0 60px rgba(50, 50, 100, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    animation: clockGlow 3s ease-in-out infinite;
}

@keyframes clockGlow {
    0%, 100% { box-shadow: 0 0 0 5px #2a2a4a, 0 0 50px rgba(100, 100, 255, 0.4), 0 0 100px rgba(100, 50, 255, 0.2), inset 0 0 30px rgba(0, 0, 0, 0.8); }
    50% { box-shadow: 0 0 0 5px #2a2a4a, 0 0 70px rgba(100, 100, 255, 0.6), 0 0 120px rgba(100, 50, 255, 0.4), inset 0 0 30px rgba(0, 0, 0, 0.8); }
}

.digital-clock::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 3px solid #5a5a8a;
    border-radius: 28px;
    pointer-events: none;
    animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% { border-color: #5a5a8a; }
    50% { border-color: #7a7aaa; }
}

/* Anime-style time segments with multiple glow layers */
.time-segment {
    font-size: 90px;
    font-weight: 900;
    color: #fff;
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px #00ffff,
        0 0 40px #00ffff,
        0 0 80px #0088ff,
        0 0 120px #0044ff,
        2px 2px 0 #000;
    letter-spacing: 8px;
    min-width: 100px;
    text-align: center;
    position: relative;
    animation: numberGlow 2s ease-in-out infinite alternate;
}

.time-segment::before {
    content: attr(data-value);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: transparent;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.6);
    z-index: -1;
}

@keyframes numberGlow {
    0% { 
        text-shadow: 
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            0 0 80px #0088ff,
            2px 2px 0 #000;
    }
    100% { 
        text-shadow: 
            0 0 10px #fff,
            0 0 20px #fff,
            0 0 30px #00ffff,
            0 0 60px #00ffff,
            0 0 100px #0088ff,
            0 0 150px #0044ff,
            2px 2px 0 #000;
    }
}

.time-separator {
    font-size: 70px;
    color: #ff0066;
    text-shadow: 
        0 0 10px #ff0066,
        0 0 20px #ff0066,
        0 0 40px #ff0000,
        0 0 60px #ff0000;
    animation: separatorBlink 1s ease-in-out infinite;
    position: relative;
}

@keyframes separatorBlink {
    0%, 100% { 
        opacity: 1;
        text-shadow: 0 0 10px #ff0066, 0 0 20px #ff0066, 0 0 40px #ff0000;
    }
    50% { 
        opacity: 0.6;
        text-shadow: 0 0 5px #ff0066, 0 0 10px #ff0066;
    }
}

/* Manga decoration with more elements */
.manga-decoration {
    position: absolute;
    width: 120%;
    height: 120%;
    pointer-events: none;
    top: -10%;
    left: -10%;
}

.star {
    position: absolute;
    color: #ffd700;
    font-size: 25px;
    animation: starTwinkle 1.5s ease-in-out infinite;
    text-shadow: 0 0 10px #ffd700, 0 0 20px #ffaa00;
}

.star-1 { top: 5%; left: 5%; animation-delay: 0s; }
.star-2 { top: 15%; right: 10%; animation-delay: 0.3s; }
.star-3 { bottom: 25%; left: 8%; animation-delay: 0.6s; }
.star-4 { top: 30%; left: 15%; animation-delay: 0.9s; }
.star-5 { bottom: 15%; right: 15%; animation-delay: 1.2s; }

.sparkle {
    position: absolute;
    color: #fff;
    font-size: 18px;
    animation: sparkleAnim 2s ease-in-out infinite;
    text-shadow: 0 0 10px #fff, 0 0 20px #00ffff;
}

.sparkle-1 { top: 10%; left: 20%; animation-delay: 0.2s; }
.sparkle-2 { top: 20%; right: 20%; animation-delay: 0.5s; }
.sparkle-3 { bottom: 30%; left: 20%; animation-delay: 0.8s; }
.sparkle-4 { top: 40%; left: 5%; animation-delay: 1.1s; }
.sparkle-5 { bottom: 20%; right: 8%; animation-delay: 1.4s; }

/* Additional anime-style decorations */
.decoration-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 100, 200, 0.3);
    animation: circleRotate 10s linear infinite;
}

.circle-1 {
    width: 150px;
    height: 150px;
    top: 20%;
    left: 10%;
    animation-duration: 8s;
}

.circle-2 {
    width: 100px;
    height: 100px;
    bottom: 30%;
    right: 15%;
    animation-duration: 12s;
    animation-direction: reverse;
}

@keyframes circleRotate {
    0% { transform: rotate(0deg) scale(1); opacity: 0.3; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 0.6; }
    100% { transform: rotate(360deg) scale(1); opacity: 0.3; }
}

@keyframes starTwinkle {
    0%, 100% { 
        opacity: 0.4; 
        transform: scale(0.8) rotate(0deg); 
        text-shadow: 0 0 5px #ffd700;
    }
    50% { 
        opacity: 1; 
        transform: scale(1.3) rotate(15deg); 
        text-shadow: 0 0 15px #ffd700, 0 0 30px #ffaa00;
    }
}

@keyframes sparkleAnim {
    0%, 100% { 
        opacity: 0.2; 
        transform: scale(0.5) rotate(0deg); 
    }
    50% { 
        opacity: 0.9; 
        transform: scale(1.2) rotate(45deg); 
        text-shadow: 0 0 15px #fff, 0 0 30px #00ffff, 0 0 45px #0088ff;
    }
}

/* Date display with manga styling */
.date-display {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(145deg, rgba(30, 30, 60, 0.9), rgba(15, 15, 35, 0.9));
    padding: 15px 35px;
    border-radius: 15px;
    border: 3px solid #5a5a8a;
    box-shadow: 
        0 0 20px rgba(100, 100, 200, 0.3),
        inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.day-name {
    color: #ff6699;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 4px;
    text-shadow: 
        0 0 10px rgba(255, 102, 153, 0.8),
        0 0 20px rgba(255, 50, 100, 0.6);
    animation: dayGlow 3s ease-in-out infinite alternate;
}

@keyframes dayGlow {
    0% { text-shadow: 0 0 10px rgba(255, 102, 153, 0.8); }
    100% { text-shadow: 0 0 20px rgba(255, 102, 153, 1), 0 0 30px rgba(255, 50, 100, 0.8); }
}

.date-number {
    color: #fff;
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(145deg, #4a4a7a, #2a2a5a);
    padding: 8px 20px;
    border-radius: 8px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.month-name {
    color: #a0a0d0;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 0 5px rgba(160, 160, 208, 0.5);
}

/* AM/PM indicator with anime styling */
.ampm-indicator {
    position: absolute;
    top: 20px;
    right: 25px;
    background: linear-gradient(145deg, #5a5a8a, #3a3a6a);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 3px;
    box-shadow: 
        0 0 15px rgba(100, 100, 200, 0.4),
        inset 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 2px solid #7a7aaa;
    animation: ampmPulse 2s ease-in-out infinite;
}

@keyframes ampmPulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(100, 100, 200, 0.4), inset 0 2px 5px rgba(0, 0, 0, 0.3);
    }
    50% { 
        box-shadow: 0 0 25px rgba(100, 100, 255, 0.6), inset 0 2px 5px rgba(0, 0, 0, 0.3);
    }
}

/* Additional glow effects */
.time-segment.active {
    animation: activeGlow 0.5s ease-in-out infinite alternate;
}

@keyframes activeGlow {
    0% { 
        text-shadow: 
            0 0 10px #fff,
            0 0 20px #fff,
            0 0 40px #00ffff,
            0 0 80px #00ffff,
            0 0 120px #0088ff,
            2px 2px 0 #000;
    }
    100% { 
        text-shadow: 
            0 0 15px #fff,
            0 0 30px #fff,
            0 0 50px #00ffff,
            0 0 100px #00ffff,
            0 0 150px #0088ff,
            0 0 200px #0044ff,
            2px 2px 0 #000;
    }
}

/* Scanline effect for extra anime feel */
.clock-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 10;
    animation: scanlineMove 0.1s linear infinite;
}

@keyframes scanlineMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}