/* ========== CARDS ========== */

.card-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.card {
    width: 720px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    border: 1px solid rgba(16, 185, 129, 0.08);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    background: rgba(209, 250, 229, 0.6);
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.2);
    box-shadow: 0 12px 32px rgba(5, 150, 105, 0.1);
}

.card-text h3 {
    font-family: 'Syne', 'Manrope', sans-serif;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.card-text p {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: transparent;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.game-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    background: transparent;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Dark background for logos with light/white content on transparent bg */
.tool-icon.tool-icon--dark,
.tool-logo.tool-logo--dark {
    background: #1a1a1a;
    border-radius: 14px;
}

.tool-logo.tool-logo--dark {
    border-radius: 20px;
}

/* ========== VIEW TOGGLE ========== */

.view-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

.view-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #6b7280;
}

.view-btn.active {
    background: #059669;
    color: #ffffff;
}

/* ========== LIST VIEW ========== */

.card-list.list-view {
    gap: 8px;
}

.card-list.list-view .card {
    width: 100%;
    max-width: 720px;
    flex-direction: row;
    align-items: center;
    padding: 12px 18px;
    border-radius: 12px;
    gap: 14px;
}

.card-list.list-view .tool-icon,
.card-list.list-view .game-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}

.card-list.list-view .card-text {
    flex: 1;
    min-width: 0;
}

.card-list.list-view .card-text h3 {
    font-size: 15px;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide description in list view */
.card-list.list-view .card-text p {
    display: none;
}

/* ========== GRID VIEW (default cards) ========== */

.card-list.grid-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.card-list.grid-view .card {
    width: 720px;
}

/* ===== LIST LINK ICON ===== */

.list-link {
    display: none;
}

/* Show only in list-view */
.card-list.list-view .list-link {
    display: flex;

    width: 32px;
    height: 32px;

    align-items: center;
    justify-content: center;

    border-radius: 8px;
    margin-left: auto;

    color: #6b7280;
    font-size: 16px;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.card-list.list-view .list-link:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #059669;
    transform: translateY(-1px);
}

/* ===== DARK MODE: Cards ===== */

body.dark .card {
    background: rgba(22, 28, 24, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(52, 211, 153, 0.06);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4);
}

body.dark .card:hover {
    background: rgba(30, 38, 33, 0.9);
    border-color: rgba(52, 211, 153, 0.15);
}

body.dark .card-text p {
    color: #cbd5e1;
}

body.dark .tool-icon.tool-icon--dark,
body.dark .tool-logo.tool-logo--dark {
    background: #2a2a2a;
}

body.dark .view-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #6b7280;
}

body.dark .view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

body.dark .view-btn.active {
    background: #34d399;
    color: #0a0a0a;
}

body.dark .card-list.list-view .list-link {
    color: #9ca3af;
}

body.dark .card-list.list-view .list-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #34d399;
}
