/* ============================================
   INDEX OF COINCIDENCE CALCULATOR STYLES
   Location: assets/css/ic-calculator.css
   ============================================ */

/* Tool Container */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Section */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #00ff00;
}

.tool-badge {
    display: inline-block;
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid #00ff00;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin: 1rem 0;
    color: #00ff00;
}

.subtitle {
    color: #888;
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.difficulty-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 1rem;
    font-weight: 600;
}

.beginner-intermediate {
    background: rgba(255, 165, 0, 0.1);
    color: #ffa500;
    border: 1px solid #ffa500;
}

/* Info Panel */
.info-panel {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.info-panel h2 {
    color: #00ff00;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.info-panel p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ic-reference,
.interpretation-guide {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #00ff00;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.ic-reference h3,
.interpretation-guide h3 {
    color: #00ff00;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.ic-reference ul,
.interpretation-guide ul {
    list-style: none;
    padding: 0;
}

.ic-reference ul li,
.interpretation-guide ul li {
    color: #ccc;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
}

.ic-reference ul li:last-child,
.interpretation-guide ul li:last-child {
    border-bottom: none;
}

.ic-reference ul li strong,
.interpretation-guide ul li strong {
    color: #00ff00;
}

/* Calculator Section */
.calculator-section {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    color: #00ff00;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.label-icon {
    margin-right: 0.5rem;
}

.input-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00ff00;
    border-radius: 4px;
    color: #00ff00;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.input-group textarea:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.char-count {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: right;
}

.char-count span {
    color: #00ff00;
    font-weight: 600;
}

/* Control Buttons */
.control-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border: 2px solid;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border-color: #00ff00;
    flex: 1;
}

.btn-primary:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: #666;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00ff00;
    color: #00ff00;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Results Section */
.results-section {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section h2 {
    color: #00ff00;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* IC Value Display */
.ic-value-display {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.ic-main-value {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ic-main-value .label {
    color: #888;
    font-size: 1.2rem;
}

.ic-main-value .value {
    color: #00ff00;
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.ic-interpretation {
    padding: 1rem;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1rem;
}

.ic-interpretation.monoalphabetic {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
}

.ic-interpretation.polyalphabetic {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid #ffa500;
    color: #ffa500;
}

.ic-interpretation.random {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0000;
    color: #ff0000;
}

/* IC Scale Visualization */
.ic-scale-container {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.ic-scale-container h3 {
    color: #00ff00;
    margin-bottom: 1.5rem;
    text-align: center;
}

.ic-scale {
    position: relative;
    margin: 2rem 0;
}

.scale-bar {
    height: 40px;
    background: linear-gradient(to right, 
        #ff0000 0%, 
        #ff6600 15%, 
        #ffa500 35%, 
        #ffff00 50%, 
        #7fff00 65%, 
        #00ff00 100%);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.ic-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 60px;
    background: #fff;
    box-shadow: 0 0 10px #fff, 0 0 20px #fff;
    transition: left 0.5s ease;
}

.ic-marker::before {
    content: '▼';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.5rem;
    text-shadow: 0 0 10px #fff;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    color: #888;
    font-size: 0.9rem;
}

.scale-labels span {
    text-align: center;
}

.label-left { color: #ff0000; }
.label-middle { color: #ffa500; }
.label-right { color: #00ff00; }

/* Frequency Chart */
.frequency-section {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.frequency-section h3 {
    color: #00ff00;
    margin-bottom: 1.5rem;
}

.frequency-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
    gap: 0.5rem;
    padding: 1rem;
}

.freq-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.freq-bar-visual {
    width: 100%;
    background: rgba(0, 255, 0, 0.3);
    border: 1px solid #00ff00;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    position: relative;
}

.freq-bar-visual:hover {
    background: rgba(0, 255, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.freq-letter {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.9rem;
}

.freq-count {
    color: #888;
    font-size: 0.7rem;
}

/* Statistical Details */
.stats-details {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.stats-details h3 {
    color: #00ff00;
    margin-bottom: 1.5rem;
}

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

.stat-item {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #00ff00;
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
}

.stat-value {
    color: #00ff00;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Recommendations */
.recommendations {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #00ff00;
    border-radius: 8px;
}

.recommendations h3 {
    color: #00ff00;
    margin-bottom: 1.5rem;
}

.recommendation-box {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #00ff00;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

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

.recommendation-box h4 {
    color: #00ff00;
    margin-bottom: 0.5rem;
}

.recommendation-box p {
    color: #ccc;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tool-recommendation-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tool-recommendation-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 4px;
    color: #00ff00;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tool-recommendation-links a:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* Usage Guide */
.usage-guide {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.usage-guide h2 {
    color: #00ff00;
    margin-bottom: 1.5rem;
}

.usage-guide ol {
    color: #ccc;
    line-height: 1.8;
    padding-left: 1.5rem;
}

.usage-guide ol li {
    margin-bottom: 1rem;
}

.usage-guide ol li strong {
    color: #00ff00;
}

.console-tip {
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #00ff00;
    border-radius: 4px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.console-tip strong {
    color: #00ff00;
    display: block;
    margin-bottom: 0.5rem;
}

.console-tip code {
    display: block;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff00;
    border-radius: 4px;
    padding: 0.75rem;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    margin: 0.5rem 0;
}

.console-tip p {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Educational Section */
.edu-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.edu-section h2,
.edu-section h3 {
    color: #00ff00;
    margin-bottom: 1rem;
}

.edu-section p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Related Tools */
.related-tools {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.related-tools h2 {
    color: #00ff00;
    margin-bottom: 1.5rem;
}

.tool-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tool-link {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 4px;
    padding: 1rem;
    color: #00ff00;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tool-link:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
    transform: translateY(-2px);
}

/* Footer */
.tool-footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #333;
    margin-top: 3rem;
}

.tool-footer p {
    color: #888;
    margin-bottom: 1rem;
}

.back-link {
    color: #00ff00;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-link:hover {
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }

    .ic-main-value {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ic-main-value .value {
        font-size: 2.5rem;
    }

    .control-buttons {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .tool-links {
        grid-template-columns: 1fr;
    }

    .frequency-chart {
        grid-template-columns: repeat(13, 1fr);
    }
}