body {
    font-family: Arial, sans-serif;
    margin: 20px;
    padding: 0;
    line-height: 1.6;
}

.guide-container {
    display: flex;
    min-height: 100vh;
}

.guide-nav {
    flex: 0 0 250px;
    background: #fff;
    padding: 20px;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.guide-nav ul {
    list-style: none;
    padding: 0;
}

.guide-nav li {
    margin: 10px 0;
}

.guide-nav a {
    color: #007bff;
    text-decoration: none;
}

.guide-nav a:hover {
    text-decoration: underline;
}

.guide-content {
    flex: 1;
    padding: 20px;
    background: #f0f0f0;
}

h1, h2, h3 {
    color: #333;
}

h2 {
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

h3 {
    color: #dc3545;
}

p, ul {
    margin: 10px 0;
}

ul {
    padding-left: 20px;
}

.code-block {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 10px 0;
    white-space: pre-wrap;
}

.card-sample {
    width: 50px;
    height: 50px;
    perspective: 1000px;
}

.card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
    position: relative;
}

.card-inner.flipped {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    color: white;
}

.card-front {
    background-color: #007bff;
}

.card-back {
    background-color: #28a745;
    transform: rotateY(180deg);
}

.shuffle-highlight {
    border: 4px solid #800080;
    box-shadow: 0 0 15px #800080, 0 0 5px #ffffff inset;
    transform: scale(1.1);
    animation: blink 0.5s infinite alternate;
}

@keyframes blink {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

#shuffleOverlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    font-size: 90px;
    color: #00ff00;
    text-shadow: 4px 4px 8px rgba(0,0,0,0.8);
    animation: comboPulse 1s ease-out forwards;
}

@keyframes comboPulse {
    0% { opacity: 1; transform: translate(-50%, -50%) rotate(-5deg) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) rotate(-5deg) scale(1.4); }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(-5deg) scale(1.8); }
}

button {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px;
}

button:hover {
    background-color: #0056b3;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 10px 5px;
}

.back-button:hover {
    background-color: #5a6268;
}

@media (max-width: 768px) {
    .guide-container {
        flex-direction: column;
    }
    .guide-nav {
        flex: none;
        max-height: 200px;
        overflow-y: auto;
    }
}