/* Iframe Tool Container Styles */
.iframe-tool-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-header {
    background: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}

.tool-header h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.tool-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.iframe-wrapper {
    flex: 1;
    position: relative;
    min-height: 600px;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.tool-footer {
    background: #f8f9fa;
    padding: 8px 20px;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.tool-footer small {
    color: #6c757d;
    font-size: 12px;
}

/* PhET Simulations Enhancements */
.phet-sim-card h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.simulation-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    color: #667eea;
    z-index: 10;
}

.phet-sim-content {
    position: relative;
    min-height: 500px;
    background: #f8f9fa;
}

.phet-sim-content iframe {
    background: white;
    border-radius: 8px;
}

/* Enhanced Modal Styles for Tools */
.vidya-modal-content.tool-modal {
    width: 1200px;
    height: 800px;
}

@media (max-width: 1300px) {
    .vidya-modal-content.tool-modal {
        width: 95vw;
        height: 90vh;
    }
}

@media (max-width: 768px) {
    .vidya-modal-content.tool-modal {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .iframe-wrapper {
        min-height: 400px;
    }
    
    .tool-header {
        padding: 12px 16px;
    }
    
    .tool-header h3 {
        font-size: 16px;
    }
}

/* Loading States */
.tool-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #667eea;
    font-size: 16px;
}

.tool-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

/* Error States */
.tool-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #dc3545;
    text-align: center;
    padding: 40px;
}

.tool-error h4 {
    margin-bottom: 16px;
    font-size: 18px;
}

.tool-error p {
    margin-bottom: 20px;
    color: #6c757d;
}

.retry-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #5a67d8;
}

/* Calculator Button Enhancements */
.calc-btn {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.calc-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.calc-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.calc-btn.operator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.calc-btn.operator:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6c5ce7 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.calc-btn.equals {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-color: #48bb78;
}

.calc-btn.equals:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.calc-btn.clear {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border-color: #f56565;
}

.calc-btn.clear:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.calc-btn.function {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    font-size: 14px;
    border-color: #ed8936;
}

.calc-btn.function:hover {
    background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
}

.calc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Scientific Calculator Mode */
.calculator-mode-toggle {
    display: flex;
    margin-bottom: 16px;
    background: #e9ecef;
    border-radius: 8px;
    padding: 4px;
    align-items: center;
    gap: 8px;
}

.mode-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
}

.mode-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.angle-mode-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.angle-mode-btn:hover {
    background: #5a6268;
}

.memory-indicator {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: auto;
}

/* Scientific Functions Grid */
.scientific-functions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f1f3f4;
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.scientific-functions.hidden {
    display: none;
}

.scientific-functions .calc-btn {
    min-height: 45px;
    font-size: 13px;
    padding: 8px;
}

/* Calculator Help */
.calculator-help {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.calculator-help small {
    color: #6c757d;
    font-size: 11px;
    line-height: 1.3;
}

/* Responsive Calculator */
@media (max-width: 768px) {
    .calculator-container {
        max-width: 100%;
        padding: 12px;
        margin: 0;
    }
    
    .calc-btn {
        min-height: 50px;
        font-size: 16px;
        padding: 12px;
    }
    
    .calculator-display {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .calculator-current {
        font-size: 24px;
    }
    
    .calculator-history {
        font-size: 12px;
    }
    
    .scientific-functions {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 12px;
    }
    
    .scientific-functions .calc-btn {
        min-height: 40px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .calculator-buttons {
        gap: 8px;
    }
    
    .calc-btn {
        min-height: 45px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .calculator-display {
        padding: 12px;
        min-height: 50px;
    }
    
    .calculator-current {
        font-size: 20px;
    }
}

/* Dictionary Enhancements */
.dictionary-container,
.wikipedia-container {
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dictionary-search,
.wikipedia-search {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.dictionary-input,
.wikipedia-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.dictionary-input:focus,
.wikipedia-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dictionary-search-btn,
.wikipedia-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dictionary-search-btn:hover,
.wikipedia-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dictionary-results,
.wikipedia-results {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: white;
}

/* Better scroll styling */
.dictionary-results::-webkit-scrollbar,
.wikipedia-results::-webkit-scrollbar,
.iframe-wrapper::-webkit-scrollbar {
    width: 8px;
}

.dictionary-results::-webkit-scrollbar-track,
.wikipedia-results::-webkit-scrollbar-track,
.iframe-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dictionary-results::-webkit-scrollbar-thumb,
.wikipedia-results::-webkit-scrollbar-thumb,
.iframe-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dictionary-results::-webkit-scrollbar-thumb:hover,
.wikipedia-results::-webkit-scrollbar-thumb:hover,
.iframe-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}/* Smart Tools Specific Styles */

/* Calculator Styles */
.calculator-container {
    max-width: 400px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.calculator-display {
    background: #1a1a1a;
    color: #00ff00;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
    text-align: right;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #333;
    overflow: hidden;
    word-wrap: break-word;
}

.calculator-history {
    font-size: 14px;
    color: #00aa00;
    margin-bottom: 8px;
    min-height: 20px;
}

.calculator-current {
    font-size: 28px;
    color: #00ff00;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.calc-btn {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.calc-btn:active {
    transform: translateY(0);
}

.calc-btn.operator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.calc-btn.operator:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6c5ce7 100%);
}

.calc-btn.equals {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-color: #48bb78;
}

.calc-btn.equals:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.calc-btn.clear {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border-color: #f56565;
}

.calc-btn.clear:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.calc-btn.function {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    font-size: 14px;
    border-color: #ed8936;
}

.calc-btn.function:hover {
    background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
}

/* Scientific Functions */
.calculator-mode-toggle {
    display: flex;
    margin-bottom: 16px;
    background: #e9ecef;
    border-radius: 8px;
    padding: 4px;
}

.mode-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mode-btn.active {
    background: #667eea;
    color: white;
}

.scientific-functions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f1f3f4;
    border-radius: 12px;
}

.scientific-functions.hidden {
    display: none;
}

/* Periodic Table Styles */
.periodic-table-container {
    max-width: 100%;
    overflow-x: auto;
    padding: 20px;
}

.periodic-table {
    display: grid;
    grid-template-columns: repeat(18, 1fr);
    gap: 2px;
    min-width: 800px;
    margin: 0 auto;
}

.element {
    aspect-ratio: 1;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid transparent;
    position: relative;
}

.element:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.element.alkali-metal {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.element.alkaline-earth-metal {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: white;
}

.element.transition-metal {
    background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
    color: white;
}

.element.post-transition-metal {
    background: linear-gradient(135deg, #1dd1a1 0%, #10ac84 100%);
    color: white;
}

.element.metalloid {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #333;
}

.element.nonmetal {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
}

.element.halogen {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
}

.element.noble-gas {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    color: white;
}

.element.lanthanide {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
    color: white;
}

.element.actinide {
    background: linear-gradient(135deg, #00cec9 0%, #00b894 100%);
    color: white;
}

.element-symbol {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.element-number {
    font-size: 8px;
    opacity: 0.8;
    position: absolute;
    top: 2px;
    left: 3px;
}

.element-mass {
    font-size: 7px;
    opacity: 0.8;
    position: absolute;
    bottom: 2px;
    right: 3px;
}

/* Element Details Modal */
.element-details {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    margin: 0 auto;
}

.element-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f3f4;
}

.element-preview {
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-right: 20px;
    font-weight: 700;
}

.element-preview .element-symbol {
    font-size: 24px;
}

.element-info h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #333;
}

.element-info p {
    color: #666;
    margin-bottom: 4px;
}

.element-properties {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.property-group {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
}

.property-group h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

.property {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.property-label {
    color: #666;
}

.property-value {
    font-weight: 600;
    color: #333;
}

/* Legend */
.periodic-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* PhET Simulations */
.phet-simulations-container {
    max-width: 800px;
    margin: 0 auto;
}

.phet-simulations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.phet-sim-card {
    background: linear-gradient(135deg, #f8faff 0%, #f1f5ff 100%);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.phet-sim-card:hover {
    transform: translateY(-4px);
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.phet-sim-card h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.phet-sim-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.phet-simulation-viewer {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.phet-sim-header {
    background: #f8f9fa;
    padding: 16px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 16px;
}

.phet-back-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #495057;
}

.phet-back-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.phet-sim-content {
    padding: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phet-sim-content iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 8px;
}

/* Dictionary Styles */
.dictionary-container {
    max-width: 600px;
    margin: 0 auto;
}

.dictionary-search {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.dictionary-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.dictionary-input:focus {
    outline: none;
    border-color: #667eea;
}

.dictionary-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dictionary-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dictionary-results {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-height: 300px;
}

.dictionary-placeholder {
    text-align: center;
    color: #adb5bd;
    padding: 40px 20px;
}

.dictionary-placeholder svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.word-definition {
    margin-bottom: 24px;
}

.word-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f3f4;
}

.word-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.word-pronunciation {
    font-size: 16px;
    color: #667eea;
    font-style: italic;
    margin-bottom: 4px;
}

.word-part-of-speech {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.definition-list {
    list-style: none;
    padding: 0;
}

.definition-item {
    margin-bottom: 16px;
    padding-left: 24px;
    position: relative;
}

.definition-item::before {
    content: counter(definition-counter);
    counter-increment: definition-counter;
    position: absolute;
    left: 0;
    top: 0;
    background: #667eea;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.definition-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 8px;
}

.definition-example {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
    padding: 8px 16px;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    border-radius: 0 6px 6px 0;
}

.word-synonyms,
.word-antonyms {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.synonyms-title,
.antonyms-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.synonym-list,
.antonym-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.synonym,
.antonym {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.synonym:hover,
.antonym:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Wikipedia Styles */
.wikipedia-container {
    max-width: 700px;
    margin: 0 auto;
}

.wikipedia-search {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.wikipedia-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.wikipedia-input:focus {
    outline: none;
    border-color: #667eea;
}

.wikipedia-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wikipedia-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wikipedia-results {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

.wikipedia-article {
    line-height: 1.7;
    color: #333;
}

.wikipedia-article h1 {
    font-size: 28px;
    margin-bottom: 16px;
    color: #333;
    font-weight: 700;
}

.wikipedia-article h2 {
    font-size: 22px;
    margin: 24px 0 12px 0;
    color: #333;
    font-weight: 600;
}

.wikipedia-article p {
    margin-bottom: 16px;
    font-size: 16px;
}

.wikipedia-article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.wikipedia-source {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.wikipedia-source a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.wikipedia-source a:hover {
    text-decoration: underline;
}

/* Responsive adjustments for tools */
@media (max-width: 768px) {
    .calculator-container {
        max-width: 100%;
        padding: 16px;
    }
    
    .calc-btn {
        min-height: 50px;
        font-size: 16px;
    }
    
    .periodic-table {
        min-width: 100%;
        gap: 1px;
    }
    
    .element {
        min-width: 30px;
        min-height: 30px;
        font-size: 9px;
    }
    
    .element-symbol {
        font-size: 11px;
    }
    
    .phet-simulations-grid {
        grid-template-columns: 1fr;
    }
    
    .dictionary-search,
    .wikipedia-search {
        flex-direction: column;
    }
    
    .scientific-functions {
        grid-template-columns: repeat(3, 1fr);
    }
}