/* Electron Configuration Calculator Specific Styles */

.tool-page {
    padding-top: 0;
}

.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--text-gray);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-purple);
}

.breadcrumb .separator {
    margin: 0 10px;
    color: var(--border-color);
}

.breadcrumb .current {
    color: var(--text-dark);
    font-weight: 600;
}

.tool-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.tool-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.tool-icon-large {
    font-size: 72px;
    margin-bottom: 20px;
    animation: spin 4s ease-in-out infinite;
}

@keyframes spin {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

.tool-header h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
}

.tool-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tool-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 16px;
}

.meta-separator {
    opacity: 0.5;
}

.tool-content {
    padding: 60px 20px;
    background: #f8f9fa;
}

/* Calculator Container */
.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Quick Guide */
.quick-guide {
    background: linear-gradient(135deg, #ffeef8 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.quick-guide h3 {
    font-size: 24px;
    font-weight: 800;
    color: #f5576c;
    margin-bottom: 20px;
}

.guide-steps {
    display: grid;
    gap: 15px;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.step-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 50%;
    font-weight: 800;
    font-size: 18px;
}

.step-text {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

/* Calculator Section */
.calculator-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.mode-tab {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-tab:hover {
    border-color: #f5576c;
    color: #f5576c;
}

.mode-tab.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: transparent;
}

/* Calc Modes */
.calc-mode {
    display: none;
}

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

.calc-mode h2 {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin-bottom: 10px;
}

.mode-description {
    font-size: 15px;
    color: #666;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #f5576c;
}

/* Input Wrapper */
.input-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}

.input-wrapper input {
    flex: 1;
    padding: 18px 25px;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    font-size: 18px;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #f5576c;
    box-shadow: 0 0 0 4px rgba(245, 87, 108, 0.1);
}

/* Suggestions */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 15px 15px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background: #ffeef8;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-symbol {
    font-weight: 700;
    color: #f5576c;
    margin-right: 10px;
}

.suggestion-number {
    color: #999;
    font-size: 14px;
}

/* Ion Grid */
.ion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.input-group input {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #f5576c;
    box-shadow: 0 0 0 4px rgba(245, 87, 108, 0.1);
}

.charge-input {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.charge-input select {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.charge-input select:focus {
    outline: none;
    border-color: #f5576c;
}

/* Compare Grid */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* Calculate Button */
.calc-btn {
    padding: 18px 35px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.calc-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
}

.calc-btn:active {
    transform: translateY(-1px);
}

.calc-btn span {
    font-size: 20px;
}

/* Examples Section */
.examples-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.examples-section h3 {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.example-btn {
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.example-btn:hover {
    border-color: #f5576c;
    color: #f5576c;
    background: #ffeef8;
    transform: translateY(-2px);
}

/* Result Section */
.result-section {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #ffeef8 0%, #ffffff 100%);
    border-radius: 20px;
    border: 3px solid #f5576c;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.result-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #f5576c;
}

.clear-btn {
    padding: 10px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Element Info */
.element-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 25px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.element-symbol-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 12px;
}

.element-symbol-large .symbol {
    font-size: 48px;
    font-weight: 900;
}

.element-symbol-large .number {
    font-size: 18px;
    opacity: 0.9;
}

.element-details {
    display: grid;
    gap: 10px;
}

.element-name {
    font-size: 28px;
    font-weight: 800;
    color: #333;
}

.element-property {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.element-property:last-child {
    border-bottom: none;
}

.property-label {
    font-weight: 600;
    color: #666;
}

.property-value {
    color: #333;
}

/* Config Display */
.config-display {
    padding: 25px;
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.config-display h3 {
    font-size: 18px;
    font-weight: 800;
    color: #f5576c;
    margin-bottom: 15px;
}

.config-row {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 12px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.config-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    font-family: system-ui;
}

.config-value {
    color: #333;
    font-size: 18px;
    word-break: break-word;
}

.config-value sup {
    font-size: 12px;
}

/* Orbital Diagram */
.orbital-diagram {
    padding: 25px;
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.orbital-diagram h3 {
    font-size: 18px;
    font-weight: 800;
    color: #f5576c;
    margin-bottom: 20px;
}

.orbital-level {
    margin-bottom: 20px;
}

.orbital-level-label {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    margin-bottom: 10px;
}

.orbital-boxes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.orbital-box {
    width: 50px;
    height: 50px;
    border: 2px solid #f5576c;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    position: relative;
}

.orbital-box-label {
    position: absolute;
    bottom: -20px;
    font-size: 11px;
    color: #999;
}

.electron-arrow {
    font-size: 20px;
    line-height: 1;
}

.electron-arrow.up {
    color: #f5576c;
}

.electron-arrow.down {
    color: #f093fb;
}

/* Explanation Box */
.explanation-box {
    padding: 20px;
    background: white;
    border-radius: 15px;
    border-left: 4px solid #f5576c;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.explanation-box h4 {
    font-size: 16px;
    font-weight: 800;
    color: #f5576c;
    margin-bottom: 12px;
}

.explanation-box p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
}

.explanation-box ul {
    margin: 10px 0;
    padding-left: 25px;
    color: #555;
}

.explanation-box li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 140px;
    padding: 15px 25px;
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn:hover {
    border-color: #f5576c;
    color: #f5576c;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.2);
}

.action-btn span {
    font-size: 20px;
}

/* Rules Box */
.rules-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.rules-box h3 {
    font-size: 24px;
    font-weight: 800;
    color: #f5576c;
    margin-bottom: 25px;
    text-align: center;
}

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

.rule-card {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border-top: 4px solid #f5576c;
}

.rule-card h4 {
    font-size: 18px;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
}

.rule-card p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.rule-example {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.rule-example strong {
    color: #f5576c;
}

/* SEO Content */
.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: 50px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

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

.content-article h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 35px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.content-article p {
    margin-bottom: 20px;
    color: var(--text-gray);
    font-size: 16px;
}

.content-article ul {
    margin-bottom: 25px;
    padding-left: 30px;
    color: var(--text-gray);
}

.content-article li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.content-article strong {
    color: var(--text-dark);
    font-weight: 700;
}

.related-tools {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

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

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

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-align: center;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #f5576c;
}

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

.related-tool-card .tool-name {
    font-weight: 700;
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 32px;
    }
    
    .tool-subtitle {
        font-size: 16px;
    }
    
    .calculator-section {
        padding: 25px;
    }
    
    .mode-tabs {
        flex-direction: column;
    }
    
    .mode-tab {
        width: 100%;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .ion-grid,
    .compare-grid {
        grid-template-columns: 1fr;
    }
    
    .element-info {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .element-symbol-large {
        margin: 0 auto;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .content-article h2 {
        font-size: 26px;
    }
    
    .content-article h3 {
        font-size: 20px;
    }
    
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 40px 20px;
    }
    
    .tool-header h1 {
        font-size: 26px;
    }
    
    .tool-icon-large {
        font-size: 56px;
    }
    
    .quick-guide {
        padding: 20px;
    }
    
    .guide-step {
        flex-direction: column;
        text-align: center;
    }
    
    .calculator-section {
        padding: 20px;
    }
    
    .calc-btn {
        width: 100%;
        justify-content: center;
    }
    
    .element-name {
        font-size: 22px;
    }
    
    .orbital-boxes {
        gap: 5px;
    }
    
    .orbital-box {
        width: 40px;
        height: 40px;
    }
}

/* Print Styles */
@media print {
    .tool-header,
    .breadcrumb,
    .quick-guide,
    .mode-tabs,
    .examples-section,
    .action-buttons,
    .rules-box,
    .seo-content {
        display: none !important;
    }
    
    .result-section {
        border: 1px solid #333;
        box-shadow: none;
    }
}