body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f0f0f0;
}

.card {
    width: 240px;
    height: 336px;
    margin: 20px;
    border: 2px solid #c0a080;
    box-sizing: border-box;
}

.card-front {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(45deg, #f8e8d0, #fff);
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Interior border */
.card-front::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid #c0a080;
    border-radius: 5px;
}

/* Center diamond */
.card-front::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--diamond-gradient, linear-gradient(45deg, #e8d0b0, #f8e8d0));
    transform: rotate(45deg);
    border: 2px solid #c0a080;
}

.card-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 12px 24px;
    z-index: 1;
    font-weight: bold;
    border: 1px solid #c0a080;
    text-align: center;
    width: 144px;
    box-sizing: border-box;
    font-size: 1.1em;
}

.initial-card {
    cursor: pointer;
    transition: transform 0.3s;
}

.initial-card .card-front {
    background: linear-gradient(45deg, #ffd700, #ffa500) !important;
    border: 3px solid #daa520 !important;
}

.initial-card .card-label {
    font-size: 1.2em;
    font-weight: bold;
    color: #8b4513 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    border: 2px solid #daa520 !important;
}

.initial-card:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.initial-card:active {
    transform: scale(0.95);
}

.card-container {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    transform: translateY(-50%);
}

.hidden {
    display: none !important;
}

.left-card, .center-card, .right-card {
    opacity: 0;
    transform: translateX(-100px);
}

.slide-in {
    animation: slideIn 0.5s forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rainbow-border {
    0% { border-color: red; }
    17% { border-color: orange; }
    33% { border-color: yellow; }
    50% { border-color: green; }
    67% { border-color: blue; }
    83% { border-color: indigo; }
    100% { border-color: violet; }
}

@keyframes rainbow-bg {
    0% { background: linear-gradient(45deg, #ff9999, #ffcccc); }
    17% { background: linear-gradient(45deg, #ffcc99, #ffddaa); }
    33% { background: linear-gradient(45deg, #ffff99, #ffffcc); }
    50% { background: linear-gradient(45deg, #99ff99, #ccffcc); }
    67% { background: linear-gradient(45deg, #99ccff, #ccddff); }
    83% { background: linear-gradient(45deg, #9999ff, #ccccff); }
    100% { background: linear-gradient(45deg, #ff99ff, #ffccff); }
}

@keyframes rainbow-text {
    0% { color: red; }
    17% { color: orange; }
    33% { color: yellow; }
    50% { color: green; }
    67% { color: blue; }
    83% { color: indigo; }
    100% { color: violet; }
}

.special-label {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em;
    font-weight: bold;
    padding: 6px 12px;
    background: white;
    border: 1px solid;
    border-radius: 3px;
    display: none;
}

.instruction-text {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s;
}

.instruction-text.visible {
    opacity: 1;
}

.collection-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.collection-button button {
    padding: 10px 20px;
    font-size: 16px;
    background: #c0a080;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.collection-button button:hover {
    background: #a08060;
}

.collection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 10px;
}

.card.selectable {
    cursor: pointer;
    transition: transform 0.3s;
}

.card.selectable:hover {
    transform: translateY(-10px);
}

