/* === Homepage === */

.home-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Header inner layout (shared with generator) */
.app-header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
}

.app-header-inner h1 {
    flex: 1;
    text-align: center;
}

.header-back {
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.header-back:hover {
    color: #fff;
}

/* Hero */
.hero {
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 36px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 36px;
}

.hero-grid-wrap {
    flex-shrink: 0;
}

.hero-grid {
    border-collapse: collapse;
    user-select: none;
}

.hero-grid td {
    width: 36px;
    height: 36px;
    text-align: center;
    vertical-align: middle;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    font-weight: 700;
    color: #c0c4cc;
    border: 1px solid #e8e8e8;
}

.hero-grid td.hl-word {
    color: #1a1a2e;
    background: rgba(54, 162, 235, 0.2);
}

.hero-grid td.hl-search {
    color: #1a1a2e;
    background: rgba(255, 99, 132, 0.2);
}

.hero-grid td.hl-both {
    color: #1a1a2e;
    background: linear-gradient(135deg, rgba(54, 162, 235, 0.25), rgba(255, 99, 132, 0.25));
}

.hero-text {
    flex: 1;
    min-width: 0;
}

.hero-text h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.hero-text p {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
}

.btn-large {
    display: inline-flex;
    padding: 12px 28px;
    font-size: 15px;
    border-radius: 10px;
    white-space: nowrap;
    text-decoration: none;
}

/* Recent section */
.recent-header {
    margin-bottom: 16px;
}

.recent-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

/* Puzzle card grid */
.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.loading-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 15px;
}

/* Card */
.puzzle-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 2px solid transparent;
}

.puzzle-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #1a1a2e;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    flex: 1;
    word-break: break-word;
}

.card-delete {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #ccc;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.card-delete:hover {
    color: #e74c3c;
}

.card-details {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card-badge {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    background: #e8eaf6;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.card-stat {
    font-size: 13px;
    color: #888;
}

.card-date {
    font-size: 12px;
    color: #aaa;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    color: #888;
    margin-bottom: 20px;
}

.empty-state .btn {
    display: inline-flex;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 640px) {
    .hero {
        padding: 28px 20px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .puzzle-grid {
        grid-template-columns: 1fr;
    }
}
