body {
    background-color: var(--surface);
    color: var(--on-surface);
}

header {
    padding: 1rem;
    background-color: var(--primary-container);
    color: var(--on-primary-container);
    margin-bottom: 1rem;
}

header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header a {
    color: inherit;
    text-decoration: none;
}

#server-clock {
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    color: var(--primary);
    background: var(--surface-container-highest);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--outline-variant);
    min-width: 80px;
    text-align: center;
}

/* Haptic Feedback for Buttons */
button,
.button {
    transition:
        transform 0.1s ease,
        box-shadow 0.1s ease !important;
}

button:active,
.button:active {
    transform: translateY(2px) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

main {
    padding: 1rem;
}

article {
    background-color: var(--surface-container);
    border-radius: 8px;
    padding: 1rem;
}

.scroll {
    overflow-y: auto;
    border: 1px solid var(--outline-variant);
    border-radius: 4px;
    background-color: var(--surface-container-low);
    margin-bottom: 1rem;
}

.error-text {
    color: var(--error);
    font-weight: bold;
}

.grey-text {
    color: var(--outline);
    font-size: 0.8rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--outline-variant);
    margin: 0.5rem 0;
}

form.row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.center-align {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Olympiad Poker Cards */
.poker-deck {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem;
}

.poker-card {
    width: 100px;
    height: 140px;
    border-radius: 12px;
    border: 2px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface-container);
    cursor: grab;
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        background-color 0.2s;
    user-select: none;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.poker-card:hover {
    transform: translateY(-8px) rotate(2deg);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
    background: var(--surface-container-high);
}

.poker-card:active {
    cursor: grabbing;
}

.poker-card .value {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: var(--primary);
}

.poker-card .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    font-weight: bold;
    color: var(--secondary);
}

.poker-card.small {
    width: 60px;
    height: 84px;
    border-width: 1px;
}

.poker-card.small .value {
    font-size: 1.5rem;
}

.poker-card.small .label {
    font-size: 0.5rem;
    margin-top: 0.2rem;
}

.multiplier-slot {
    width: 110px;
    height: 150px;
    border: 2px dashed var(--outline-variant);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-container-low);
    transition: all 0.3s ease;
}

.multiplier-slot.active {
    border-color: var(--primary);
    background: var(--primary-container);
    border-style: solid;
}

.multiplier-slot .poker-card {
    margin: 0;
    box-shadow: none;
}

/* Reveal Animations */
.poker-card.reveal {
    animation: card-reveal 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform-style: preserve-3d;
}

@keyframes card-reveal {
    0% {
        transform: scale(1) rotateY(0deg);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2) rotateY(90deg) translateZ(50px);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

.multiplier-text-rise {
    animation: text-rise 2s ease-out forwards;
    display: inline-block;
}

@keyframes text-rise {
    0% {
        transform: translateY(0) translateZ(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) translateZ(30px);
        opacity: 1;
        color: var(--primary);
        text-shadow: 0 0 10px var(--primary);
    }
    100% {
        transform: translateY(-10px) translateZ(10px);
        opacity: 1;
    }
}

/* Social Features */
.friend-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--surface-container-high);
}

.friend-status.pending {
    border: 1px dashed var(--outline);
}

.friend-status.accepted {
    border: 1px solid var(--primary);
}

.chat-message {
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--surface-container-low);
}

.chat-message .meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.chat-message .username {
    font-weight: bold;
}

.chat-message .timestamp {
    color: var(--outline);
}

.role-admin {
    color: #10b981;
} /* Emerald */
.role-participant {
    color: #f97316;
} /* Orange */
.role-user {
    color: #ffffff;
} /* White */
