/* Crossword Puzzle - Tool Specific */

.crossword-container
 {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
}
.crossword-header {
    text-align: center;
    margin-bottom: 30px;
}

.crossword-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.crossword-header p {
    color: #666;
    font-size: 16px;
}

.crossword-body {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Puzzle Setup */
.puzzle-setup {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 30px;
    border-radius: 15px;
}

.puzzle-setup h3 {
    color: #0c4a6e;
    margin-bottom: 25px;
    font-size: 22px;
    text-align: center;
}

.theme-selection label {
    display: block;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
    font-size: 16px;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.theme-card {
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-card:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.theme-card.active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.theme-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
}

.theme-card strong {
    display: block;
    color: #1e293b;
    font-size: 16px;
    margin-bottom: 5px;
}

.theme-card p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.difficulty-selection {
    margin-bottom: 25px;
}

.difficulty-selection label {
    display: block;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    font-size: 16px;
}

.difficulty-selection select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: white;
}

.difficulty-selection select:focus {
    outline: none;
    border-color: #3b82f6;
}

.generate-puzzle-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.generate-puzzle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.generate-puzzle-btn span {
    font-size: 24px;
}

/* Puzzle Game */
.puzzle-game {
    margin-top: 30px;
}

.game-controls {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.timer-display, .progress-display {
    color: white;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ctrl-btn {
    padding: 10px 18px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.ctrl-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

/* Puzzle Container */
.puzzle-container {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px;
    align-items: start;
}

/* Crossword Grid */
.crossword-grid {
    display: grid;
    gap: 1px;
    background: #1e293b;
    padding: 2px;
    border-radius: 8px;
    width: fit-content;
}

.cw-cell {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
}

.cw-cell.blocked {
    background: #1e293b;
    cursor: default;
}

.cw-cell input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    background: transparent;
    color: #1e293b;
}

.cw-cell input:focus {
    outline: none;
    background: #dbeafe;
}

.cw-cell.correct {
    background: #dcfce7 !important;
}

.cw-cell.wrong {
    background: #fee2e2 !important;
}

.cw-cell .cell-number {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

/* Clues Container */
.clues-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    max-height: 700px;
    overflow-y: auto;
}

.clues-section {
    margin-bottom: 25px;
}

.clues-section h4 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.clues-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clue-item {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    cursor: pointer;
    transition: all 0.3s;
}

.clue-item:hover {
    background: #f0f9ff;
    transform: translateX(5px);
}

.clue-item.completed {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.clue-number {
    font-weight: 700;
    color: #3b82f6;
    margin-right: 8px;
}

.clue-text {
    color: #475569;
    font-size: 14px;
}

/* Info Boxes */
.info-boxes {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.how-to-play {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 25px;
    border-radius: 15px;
}

.how-to-play h4 {
    color: #166534;
    margin-bottom: 20px;
    font-size: 20px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.step-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 13px;
    color: #166534;
    line-height: 1.6;
}

.step-item strong {
    display: block;
    margin-bottom: 5px;
    color: #15803d;
}

.features-list {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 25px;
    border-radius: 15px;
}

.features-list h4 {
    color: #92400e;
    margin-bottom: 20px;
    font-size: 20px;
}

.features-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-box {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.feature-box span {
    font-size: 30px;
    display: block;
    margin-bottom: 8px;
}

.feature-box strong {
    display: block;
    color: #92400e;
    font-size: 14px;
    margin-bottom: 5px;
}

.feature-box p {
    font-size: 12px;
    color: #78350f;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .crossword-body {
        padding: 20px 15px;
    }
    
    .crossword-container {
        padding: 15px 10px;
    }
    
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .theme-card {
        padding: 15px 10px;
    }
    
    .theme-icon {
        font-size: 28px;
    }
    
    .puzzle-container {
        grid-template-columns: 1fr;
    }
    
    .crossword-grid {
        width: 100%;
        overflow-x: auto;
    }
    
    .cw-cell {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .cw-cell input {
        font-size: 16px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-btns {
        width: 100%;
        justify-content: space-between;
    }
    
    .ctrl-btn {
        flex: 1;
    }
    
    .info-boxes {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .features-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .crossword-container {
        padding: 10px 5px;
    }
    
    .crossword-body {
        padding: 15px 10px;
    }
    
    .puzzle-setup {
        padding: 20px 15px;
    }
    
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .theme-card {
        padding: 12px 8px;
    }
    
    .theme-icon {
        font-size: 24px;
    }
    
    .theme-card strong {
        font-size: 14px;
    }
    
    .theme-card p {
        font-size: 11px;
    }
    
    .cw-cell {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .cw-cell input {
        font-size: 14px;
    }
    
    .cw-cell .cell-number {
        font-size: 8px;
    }
    
    .clues-container {
        padding: 15px;
    }
    
    .action-btns {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }
    
    .ctrl-btn {
        padding: 10px;
        font-size: 13px;
    }
}









div#crosswordGrid {
    margin: auto;
    text-align: center;
    width: auto;
    gap: 5px;
    padding: 10px;
    border-radius: 0px;
}
.theme-grid {
	grid-template-columns: repeat(8, 1fr);
	gap: 8px;
}
.steps-grid {
	grid-template-columns: repeat(2, 1fr);
}
.features-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}
@media (max-width:480px){
	.tool-header h1 {
		font-size: 32px;
	}
	.tool-icon-large {
		font-size: 42px;
	}
	p.tool-subtitle {
		font-size: 16px;
	}
	.theme-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
	.steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
	.features-items {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
	.puzzle-container {
		grid-template-columns: repeat(1, 1fr);
	}
	div#crosswordGrid {
        grid-template-columns: repeat(15, 22px) !important;
        grid-template-rows: repeat(15, 22px) !important;
        padding: 5px;
        gap: 0px;
    }
	.cw-cell {
        font-size: 12px;
        width: 20px;
        height: 20px;
    }
}

@media (max-width:767px) and (min-width:481px) {
	.tool-header h1 {
		font-size: 32px;
	}
	.tool-icon-large {
		font-size: 42px;
	}
	p.tool-subtitle {
		font-size: 16px;
	}
	.theme-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
	.steps-grid {
        grid-template-columns: repeat(4, 1fr);
    }
	.features-items {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 8px;
	}
	.puzzle-container {
		grid-template-columns: repeat(1, 1fr);
	}
	div#crosswordGrid {
        grid-template-columns: repeat(15, 28px) !important;
        grid-template-rows: repeat(15, 28px) !important;
        padding: 10px;
        gap: 5px;
    }
	.cw-cell {
        font-size: 14px;
        width: 28px;
        height: 28px;
    }	
}

@media (max-width:1024px) and (min-width:768px) {
	.theme-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
	.steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
	.features-items {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
	.puzzle-container {
		grid-template-columns: repeat(1, 1fr);
	}
	.tool-header h1 {
		font-size: 32px;
	}
	.tool-icon-large {
		font-size: 42px;
	}
	p.tool-subtitle {
		font-size: 16px;
	}

	div#crosswordGrid {
        grid-template-columns: repeat(15, 35px) !important;
        grid-template-rows: repeat(15, 35px) !important;
        padding: 10px;
        gap: 5px;
    }
	.cw-cell {
        font-size: 18px;
        width: 35px;
        height: 35px;
    }
}
@media (max-width:1280px) and (min-width:1024px) {
	.puzzle-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width:1280px) and (max-width:1400px) {
	.puzzle-container {
        grid-template-columns: repeat(2, 1fr);
    }
}


html {
    scroll-behavior: smooth;
}