* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    font-family: 'Ubuntu', sans-serif;
}

.retard-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #0a0a0a;
}

.retard-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 0, 100, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(100, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(255, 200, 0, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.retard-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 700px;
    padding: 20px;
}

.main-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 60px 40px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 60px rgba(255, 0, 100, 0.1), 0 0 120px rgba(100, 0, 255, 0.05);
}

.warning-icon {
    font-size: 80px;
    margin-bottom: 10px;
    animation: pulse 1.5s ease-in-out infinite;
}

.siren {
    font-size: 80px;
    margin-bottom: 10px;
    animation: siren 0.5s ease-in-out infinite alternate;
}

.retard-title {
    font-family: 'Righteous', cursive;
    font-size: 4rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 0, 100, 0.5), 0 0 40px rgba(255, 0, 100, 0.3);
    margin-bottom: 15px;
    position: relative;
    line-height: 1.2;
}

.retard-title.named {
    font-size: 3rem;
    color: #ff1744;
    text-shadow: 0 0 20px rgba(255, 23, 68, 0.7), 0 0 60px rgba(255, 23, 68, 0.4);
    animation: shake 0.3s ease-in-out infinite;
}

/* Glitch effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    color: #0ff;
    animation: glitch-1 2s infinite linear alternate-reverse;
    clip-path: inset(0 0 50% 0);
}

.glitch::after {
    color: #f0f;
    animation: glitch-2 3s infinite linear alternate-reverse;
    clip-path: inset(50% 0 0 0);
}

.retard-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-style: italic;
}

/* Retard meter */
.retard-meter {
    margin: 30px 0 40px;
}

.meter-label {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.meter-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.meter-fill {
    height: 100%;
    width: 0%;
    border-radius: 15px;
    transition: width 0.3s ease, background 0.3s ease;
    box-shadow: 0 0 15px currentColor;
}

.meter-value {
    color: #fff;
    margin-top: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Share section */
.share-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.share-text {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
}

.name-input-group {
    display: flex;
    gap: 10px;
    max-width: 450px;
    margin: 0 auto;
}

.name-input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    font-family: 'Ubuntu', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.name-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.name-input:focus {
    border-color: #ff1744;
    box-shadow: 0 0 15px rgba(255, 23, 68, 0.2);
}

.send-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff1744, #d500f9);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 23, 68, 0.5);
}

/* Certificate */
.certificate {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    margin: 30px 0;
    overflow: hidden;
}

.cert-header {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 150, 0, 0.15));
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffd700;
    letter-spacing: 3px;
}

.cert-body {
    padding: 30px;
    color: rgba(255, 255, 255, 0.7);
}

.cert-body p {
    margin: 8px 0;
}

.cert-name {
    font-family: 'Righteous', cursive;
    font-size: 2.5rem;
    color: #ff1744;
    margin: 15px 0 !important;
    text-shadow: 0 0 10px rgba(255, 23, 68, 0.5);
}

.cert-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffd700;
    margin: 15px 0 !important;
}

.cert-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 20px !important;
}

.back-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 14px 28px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Emoji rain */
.emoji-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.falling-emoji {
    position: absolute;
    top: -50px;
    animation: fall linear forwards;
    opacity: 0.6;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes siren {
    0% { transform: rotate(-10deg) scale(1); }
    100% { transform: rotate(10deg) scale(1.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes glitch-1 {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -1px); }
    60% { transform: translate(-1px, -2px); }
    80% { transform: translate(2px, 1px); }
    100% { transform: translate(0); }
}

@keyframes glitch-2 {
    0% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(-2px, 1px); }
    60% { transform: translate(1px, 2px); }
    80% { transform: translate(-2px, -1px); }
    100% { transform: translate(0); }
}

/* Responsive */
@media (max-width: 600px) {
    .main-card {
        padding: 40px 20px;
    }

    .retard-title {
        font-size: 2.5rem;
    }

    .retard-title.named {
        font-size: 2rem;
    }

    .name-input-group {
        flex-direction: column;
    }

    .cert-name {
        font-size: 1.8rem;
    }
}
