/* Multiplication Tables - Clean & Professional */

/* Mode Tabs */
.mode-selector {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid #e5e7eb;
}

.mode-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.mode-btn:hover {
    color: #667eea;
}

.mode-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Mode Sections */
.mode-section {
    display: none;
}

.mode-section.active {
    display: block;
}

/* Learn Mode Header with Search */
.learn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
}

.learn-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1f2937;
}

/* Custom Table Input - Top Right */
.custom-table-search {
    display: flex;
    gap: 8px;
    align-items: center;
}

.custom-table-search input {
    width: 120px;
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    text-align: center;
    outline: none;
    transition: border 0.2s;
}

.custom-table-search input:focus {
    border-color: #667eea;
}

.custom-table-search button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-table-search button:hover {
    background: #5568d3;
}

/* Show Default Tables Button */
.show-default-btn {
    padding: 10px 20px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
}

.show-default-btn.visible {
    display: inline-block;
}

.show-default-btn:hover {
    background: #d97706;
}

/* Tables Container - 10 columns */
#tablesContainer {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin: 20px 0;
}

#tablesContainer.hidden {
    display: none;
}

/* Custom Table Container */
#customTableContainer {
    display: none;
    max-width: 300px;
    margin: 20px auto;
}

#customTableContainer.visible {
    display: block;
}

/* Table Card */
.table-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.2s;
}

.table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Table Header */
.table-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.play-all-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.play-all-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.1);
}

/* Table Body */
.table-body {
    padding: 8px;
}

/* Table Row */
.table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 5px;
    transition: background 0.2s;
    cursor: pointer;
}

.table-row:hover {
    background: #f3f4f6;
}

.equation {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.result {
    font-size: 15px;
    font-weight: 700;
    color: #667eea;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.result:hover {
    background: #e0e7ff;
}

/* Quiz Mode Styles */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.quiz-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1f2937;
}

.quiz-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

/* Quiz Question Card */
.quiz-question-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.question-text {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    margin: 0;
}

/* Quiz Options */
.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 500px;
    margin: 30px auto;
}

.quiz-option {
    background: white;
    border: 3px solid #e5e7eb;
    padding: 25px;
    border-radius: 12px;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    color: #1f2937;
}

.quiz-option:hover {
    background: #f9fafb;
    border-color: #667eea;
    transform: scale(1.05);
}

.quiz-option.correct {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.quiz-option.wrong {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Quiz Result */
.quiz-result {
    display: none;
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin: 30px auto;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.quiz-result.show {
    display: block;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.result-message {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 30px;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
}

.result-stat {
    text-align: center;
}

.result-label {
    font-size: 14px;
    color: #6b7280;
    display: block;
    margin-bottom: 8px;
}

.result-value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
}

.restart-quiz-btn {
    padding: 15px 40px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.restart-quiz-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Info & Features Boxes */
.info-box {
    background: linear-gradient(135deg, #ffe5e5 0%, #ffd4d4 100%);
    border-left: 5px solid #ff6b6b;
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
}

.info-box h4 {
    color: #dc2626;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.info-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    line-height: 1.7;
    font-size: 14px;
    color: #555;
    border: 2px solid rgba(255, 107, 107, 0.2);
}

.info-item strong {
    color: #dc2626;
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

/* Features Box */
.features-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid rgba(245, 158, 11, 0.2);
    margin-top: 30px;
}

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

.features-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-box li {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    color: #78350f;
    font-size: 14px;
    line-height: 1.6;
    border: 2px solid rgba(245, 158, 11, 0.1);
}

.features-box li:last-child {
    margin-bottom: 0;
}

.features-box li strong {
    color: #92400e;
}

/* SEO Content Section */
.seo-content {
    padding: 80px 20px;
    background: white;
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-article h2 {
    font-size: 32px;
    font-weight: 800;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #333;
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #444;
}

.content-article p {
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.content-article strong {
    color: #333;
    font-weight: 700;
}

/* Related Tools Section */
.related-tools {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
}

.related-tools h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    color: #667eea;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.related-tool-card .tool-icon {
    font-size: 42px;
}

.related-tool-card .tool-name {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

/* Disclaimer Section */
.disclaimer-section {
    padding: 60px 20px;
    background: #f9fafb;
}

.disclaimer-box {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border: 2px solid #fbbf24;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.1);
}

.disclaimer-box h4 {
    color: #92400e;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

.disclaimer-box p {
    color: #78350f;
    line-height: 1.8;
    font-size: 15px;
    margin: 0;
}

.disclaimer-box a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.disclaimer-box a:hover {
    text-decoration: underline;
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1f2937;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    #tablesContainer {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    #tablesContainer {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .learn-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    #tablesContainer {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .table-header h3 {
        font-size: 16px;
    }
    
    .equation {
        font-size: 12px;
    }
    
    .result {
        font-size: 14px;
    }
    
    .quiz-options {
        grid-template-columns: 1fr;
    }
    
    .question-text {
        font-size: 36px;
    }
    
    .quiz-option {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    #tablesContainer {
        grid-template-columns: repeat(2, 1fr);
    }
}