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

body {
    min-height: 100vh;
    background: #000000;
    background-image: radial-gradient(rgba(255, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', 'SF Mono', 'Fira Code', monospace;
    padding: 1rem;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.85) 0px, rgba(0,0,0,0.85) 1px, rgba(40,0,0,0.08) 1px, rgba(40,0,0,0.08) 3px);
    pointer-events: none;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 750px;
    width: 100%;
}

.clock-wrapper {
    position: relative;
    width: min(72vw, 72vh, 420px);
    height: min(72vw, 72vh, 420px);
    margin: 0 auto;
    background: #030000;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.25), inset 0 0 25px rgba(255,0,0,0.08), 0 0 0 3px #3a0000;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.seconds-counter {
    margin-top: 2rem;
    background: #080000;
    padding: 0.6rem 1.8rem;
    display: inline-block;
    border-left: 2px solid #ff0000;
    border-right: 2px solid #ff0000;
    font-size: clamp(2rem, 9vw, 3.2rem);
    font-weight: bold;
    font-family: monospace;
    color: #ff1111;
    text-shadow: 0 0 10px #ff0000;
    letter-spacing: 6px;
    animation: pulseRed 1.2s infinite;
}

.doom-label {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #8b0000;
    margin-top: 0.6rem;
    text-transform: uppercase;
    font-weight: bold;
}

@keyframes pulseRed {
    0% { text-shadow: 0 0 0px #ff0000; opacity: 0.9; }
    50% { text-shadow: 0 0 12px #ff0000; opacity: 1; }
    100% { text-shadow: 0 0 0px #ff0000; opacity: 0.9; }
}

.top-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 12px;
}

.channel-btn, .comment-btn {
    background: #0a0000;
    border: 1px solid #ff0000;
    color: #ff4444;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.channel-btn:hover, .comment-btn:hover {
    background: #ff0000;
    color: #000;
    box-shadow: 0 0 15px #ff0000;
}

.comments-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 340px;
    max-height: calc(100vh - 120px);
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 90;
}

.comments-header {
    padding: 12px 16px;
    color: #ff4444;
    font-family: monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 8px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 140px);
}

.comment-item {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment-item:nth-child(odd) {
    align-self: flex-start;
}

.comment-item:nth-child(even) {
    align-self: flex-end;
}

.comment-bubble {
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 0.8rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.comment-item:nth-child(odd) .comment-bubble {
    background: rgba(10, 5, 5, 0.8);
    border: none;
    color: #cc8888;
    border-bottom-left-radius: 4px;
}

.comment-item:nth-child(even) .comment-bubble {
    background: rgba(26, 10, 10, 0.8);
    border: none;
    color: #ffaaaa;
    border-bottom-right-radius: 4px;
}

.comment-author {
    font-size: 0.65rem;
    color: #ff6666;
    margin-bottom: 4px;
    padding-left: 8px;
    font-weight: bold;
}

.comment-time {
    font-size: 0.55rem;
    color: #5a2222;
    margin-top: 4px;
    padding-left: 8px;
}

.loading, .empty {
    color: #5a2222;
    text-align: center;
    padding: 20px;
    font-size: 0.7rem;
}

.comments-list::-webkit-scrollbar {
    width: 4px;
}

.comments-list::-webkit-scrollbar-track {
    background: #0a0000;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #ff0000;
    border-radius: 4px;
}

.telegram-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 0.6rem;
    color: #3a1a1a;
    font-family: monospace;
    z-index: 90;
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 4px;
    pointer-events: none;
}