.card-container {
    perspective: 1000px;
    margin-bottom: 2rem;
    min-height: 400px;
}

.flashcard {
    position: relative;
    width: 100%;
    height: 400px;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-front {
    background: linear-gradient(135deg, var(--bg-card) 0%, #1f2b54 100%);
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #1f2b54 0%, var(--bg-card) 100%);
}

.card-content {
    text-align: center;
    width: 100%;
}

.question {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
}

.port-number {
    font-size: 3rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 1rem;
}

.answer {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.protocol {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid var(--accent-cyan);
    border-radius: 6px;
    font-size: 0.9rem;
    margin: 0.25rem;
    font-weight: 700;
}

.category {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
}

.btn-know {
    background: linear-gradient(135deg, #00ff88, #00d9ff);
    color: var(--bg-primary);
}

.btn-know:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
}

.btn-unsure {
    background: linear-gradient(135deg, #ffaa00, #ff6b00);
    color: white;
}

.btn-unsure:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 170, 0, 0.4);
}

.btn-review {
    background: linear-gradient(135deg, #ff006e, #9d4edd);
    color: white;
}

.btn-review:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255, 0, 110, 0.4);
}

.flip-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@media (max-width: 768px) {
    .flashcard {
        height: 350px;
    }

    .card-face {
        padding: 2rem;
    }

    .question {
        font-size: 1.25rem;
    }

    .port-number {
        font-size: 2.5rem;
    }

    .answer {
        font-size: 1.1rem;
    }

    .action-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}
