/* Block Blast Solver WordPress Plugin Styles */

.block-blast-solver-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafafa;
    color: #1a1a1a;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
}

.description {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.success-rate {
    color: #10b981;
    font-weight: 600;
}

.features-list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Main Tool */
.solver-tool {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    border: 1px solid #e5e7eb;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 4rem;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    background: rgba(243, 244, 246, 0.8);
    padding: 0.25rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

.tab-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    color: #1f2937;
    background: rgba(59, 130, 246, 0.1);
}

/* Tab Content */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(59, 130, 246, 0.3);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.upload-area:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.05);
}

.upload-area.drag-active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-color: #3b82f6;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 1rem;
    display: inline-block;
    animation: glow 2s ease-in-out infinite alternate;
}

.upload-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.upload-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Preview */
.preview-content {
    position: relative;
}

.preview-content img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: #dc2626;
}

.preview-actions {
    margin-top: 1.5rem;
}

/* Manual Input */
.manual-input {
    text-align: center;
}

.manual-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 1rem;
    display: inline-block;
}

.manual-input h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.manual-input p {
    color: #6b7280;
    margin-bottom: 2rem;
}

.board-container {
    max-width: 400px;
    margin: 0 auto;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.board-cell {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.board-cell:hover {
    background: rgba(59, 130, 246, 0.2);
}

.board-cell.filled {
    background: #3b82f6;
}

.board-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #e5e7eb;
    color: #6b7280;
}

.btn-secondary:hover {
    background: #d1d5db;
    color: #1f2937;
}

/* Results Section */
.results-section {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    border: 1px solid #e5e7eb;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 4rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.status-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #10b981;
    font-weight: 500;
}

.results-content {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .results-content {
        grid-template-columns: 1fr 1fr;
    }
}

.board-visualization h4,
.move-recommendations h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.mini-board {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1px;
    max-width: 200px;
    margin: 0 auto;
}

.mini-cell {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
}

.board-info {
    text-align: center;
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.moves-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.move-item {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #10b981;
}

.move-item.alternative {
    border-left-color: #f59e0b;
}

.move-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.move-title {
    font-weight: 600;
    color: #10b981;
    margin-bottom: 0.25rem;
}

.move-item.alternative .move-title {
    color: #f59e0b;
}

.move-description {
    color: #6b7280;
    font-size: 0.875rem;
}

.success-rate-display {
    text-align: right;
}

.success-rate-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
}

.move-item.alternative .success-rate-number {
    color: #f59e0b;
}

.success-rate-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.move-stats {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.stat-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.stat-badge.points {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Processing Overlay */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.processing-overlay.active {
    display: flex;
}

.processing-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 1rem;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.processing-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.processing-content p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.dot-1 {
    background: #3b82f6;
    animation-delay: -0.32s;
}

.dot-2 {
    background: #8b5cf6;
    animation-delay: -0.16s;
}

.dot-3 {
    background: #10b981;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
    to {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8), 0 0 60px rgba(139, 92, 246, 0.3);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .block-blast-solver-container {
        padding: 1rem 0.5rem;
    }
    
    .solver-tool {
        padding: 1.5rem;
    }
    
    .tab-navigation {
        flex-direction: column;
        max-width: none;
    }
    
    .features-list {
        flex-direction: column;
        align-items: center;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .results-actions {
        flex-direction: column;
    }
}