/* NYT Connections Styles */

.connections-header {
    margin-bottom: 3rem;
}

.connections-header h1 {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Puzzle Cards Grid */
.puzzles-grid {
    margin-bottom: 3rem;
}

.puzzle-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.puzzle-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.puzzle-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
    text-decoration: none;
    color: inherit;
}

.puzzle-card.puzzle-today {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.puzzle-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.puzzle-id {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.puzzle-card-date {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.puzzle-card-editor {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: auto;
}

.puzzle-card-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    color: var(--accent-primary);
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.puzzle-card:hover .puzzle-card-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Connections Puzzle Page */
.connections-puzzle-container {
    max-width: 900px;
    margin: 0 auto;
}

.connections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.connection-word {
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}

.connection-word:hover {
    background: #e8e8e8;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.connection-word.selected {
    border-width: 3px;
    font-weight: 700;
}

/* Color states for words */
.connection-word.revealed-yellow {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
}

.connection-word.revealed-green {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.connection-word.revealed-blue {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.connection-word.revealed-purple {
    background: #e9d5ff;
    border-color: #8b5cf6;
    color: #5b21b6;
}

/* Category Reveal Buttons */
.category-reveal-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-reveal {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid;
    border-radius: var(--radius-md);
    background: white;
    transition: all 0.3s ease;
    text-align: left;
    cursor: pointer;
}

.btn-reveal-yellow {
    border-color: #fbbf24;
    color: #92400e;
}

.btn-reveal-yellow:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.btn-reveal-green {
    border-color: #10b981;
    color: #065f46;
}

.btn-reveal-green:hover {
    background: #d1fae5;
    border-color: #059669;
}

.btn-reveal-blue {
    border-color: #3b82f6;
    color: #1e40af;
}

.btn-reveal-blue:hover {
    background: #dbeafe;
    border-color: #2563eb;
}

.btn-reveal-purple {
    border-color: #8b5cf6;
    color: #5b21b6;
}

.btn-reveal-purple:hover {
    background: #e9d5ff;
    border-color: #7c3aed;
}

.btn-reveal.revealed {
    opacity: 0.6;
    cursor: default;
}

.btn-reveal-all {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--text-main);
    color: white;
    border: 2px solid var(--text-main);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-reveal-all:hover {
    background: #000;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Categories Container */
.categories-container {
    margin-top: 2rem;
}

.category-group {
    background: white;
    border: 2px solid;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-group.category-yellow {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
}

.category-group.category-green {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%);
}

.category-group.category-blue {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 100%);
}

.category-group.category-purple {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #e9d5ff 0%, #ffffff 100%);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-color-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
}

.category-color-badge.category-yellow {
    background: #fbbf24;
}

.category-color-badge.category-green {
    background: #10b981;
}

.category-color-badge.category-blue {
    background: #3b82f6;
}

.category-color-badge.category-purple {
    background: #8b5cf6;
}

.category-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-word-tag {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.category-group.category-yellow .category-word-tag {
    border-color: #fbbf24;
    color: #92400e;
}

.category-group.category-green .category-word-tag {
    border-color: #10b981;
    color: #065f46;
}

.category-group.category-blue .category-word-tag {
    border-color: #3b82f6;
    color: #1e40af;
}

.category-group.category-purple .category-word-tag {
    border-color: #8b5cf6;
    color: #5b21b6;
}

/* SEO Content */
.connections-seo-content {
    line-height: 1.8;
}

.connections-seo-content h2,
.connections-seo-content h3 {
    color: var(--text-main);
}

.connections-seo-content ul li {
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

/* Navigation */
.connections-navigation {
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

/* Responsive */
@media (max-width: 768px) {
    .connections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .connection-word {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-height: 50px;
    }
    
    .category-reveal-buttons {
        gap: 0.5rem;
    }
    
    .btn-reveal {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
    
    .connections-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .connections-navigation .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .connections-grid {
        grid-template-columns: 1fr;
    }
}

