/* Binary Text Translator Tool - Specific Styles */
/* Location: assets/css/binary-text-translator.css */

/* Instructions Panel */
.instructions-panel {
    background: rgba(0, 40, 40, 0.8);
    border: 2px solid #00ff41;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.instructions-toggle {
    width: 100%;
    background: rgba(0, 255, 65, 0.1);
    border: none;
    padding: 15px;
    color: #00ff41;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.instructions-toggle:hover {
    background: rgba(0, 255, 65, 0.2);
}

.toggle-icon {
    transition: transform 0.3s;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.instructions-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.instructions-content.open {
    max-height: 1000px;
    padding: 20px;
}

.instructions-content h3 {
    color: #00ff41;
    margin-top: 0;
    margin-bottom: 15px;
}

.instructions-content ol,
.instructions-content ul {
    color: #0cc;
    line-height: 1.6;
    margin-bottom: 15px;
}

.instructions-content li {
    margin-bottom: 8px;
}

.instructions-content strong {
    color: #00ff41;
}

/* Mode Selection */
.mode-section {
    background: rgba(0, 17, 0, 0.95);
    border: 2px solid rgba(0, 255, 65, 0.5);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.mode-section h2 {
    color: #00ff41;
    margin-bottom: 1.5rem;
    text-align: center;
}

.mode-toggle {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mode-btn:hover {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.2);
}

.mode-btn.active {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.mode-icon {
    font-size: 2.5rem;
    color: #00ff41;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.mode-label {
    color: #0cc;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Input/Output Sections */
.input-section,
.output-section {
    background: rgba(0, 17, 0, 0.95);
    border: 2px solid rgba(0, 255, 65, 0.5);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.input-section h2,
.output-section h2 {
    color: #00ff41;
    margin-bottom: 1rem;
}

#input-text,
#output-text {
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

#input-text:focus,
#output-text:focus {
    outline: none;
    border-color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

#output-text {
    background: rgba(0, 0, 0, 0.95);
    cursor: text;
}

.input-info,
.output-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    color: #0cc;
    font-size: 0.9rem;
}

/* Options Section */
.options-section {
    background: rgba(0, 17, 0, 0.95);
    border: 2px solid rgba(0, 255, 65, 0.5);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.options-section h2 {
    color: #00ff41;
    margin-bottom: 1.5rem;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    color: #0cc;
    font-weight: bold;
    font-size: 1rem;
}

.option-group select {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 5px;
    padding: 0.75rem;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-group select:hover,
.option-group select:focus {
    border-color: #00ff41;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.option-group small {
    color: #888;
    font-size: 0.85rem;
}

.option-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #0cc;
    cursor: pointer;
    transition: color 0.3s ease;
}

.option-checkboxes label:hover {
    color: #00ff41;
}

.option-checkboxes input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #00ff41;
}

/* Convert Button */
.convert-section {
    text-align: center;
    margin: 2rem 0;
}

.btn-primary {
    background: linear-gradient(135deg, #00ff41, #00cc33);
    border: none;
    color: #000;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 255, 65, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 65, 0.5);
}

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

#convert-icon {
    font-size: 1.5rem;
    animation: rotate 2s linear infinite;
}

.btn-primary:hover #convert-icon {
    animation-duration: 0.5s;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Output Header */
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-copy {
    background: rgba(0, 170, 255, 0.2);
    border: 2px solid #00aaff;
    color: #00aaff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: rgba(0, 170, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 170, 255, 0.3);
}

.btn-copy.copied {
    background: rgba(0, 255, 170, 0.2);
    border-color: #00ffaa;
    color: #00ffaa;
}

.btn-secondary {
    background: rgba(255, 102, 0, 0.2);
    border: 2px solid #ff6600;
    color: #ff6600;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 102, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255, 102, 0, 0.3);
}

/* Examples Section */
.examples-section {
    background: rgba(0, 17, 0, 0.95);
    border: 2px solid rgba(0, 255, 65, 0.5);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.examples-section h2 {
    color: #00ff41;
    margin-bottom: 1.5rem;
}

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

.example-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.example-card:hover {
    border-color: #00ff41;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.2);
}

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

.example-title {
    color: #00aaff;
    font-weight: bold;
    font-size: 1.1rem;
}

.example-btn {
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.example-btn:hover {
    background: rgba(0, 255, 65, 0.3);
    transform: scale(1.05);
}

.example-preview {
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    border-radius: 5px;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    margin-bottom: 0.5rem;
    border-left: 3px solid #00ff41;
}

.example-result {
    color: #0cc;
    font-size: 0.95rem;
    text-align: center;
    padding: 0.5rem;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 3px;
}

/* Educational Content */
.conversion-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.step-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

.step-number {
    background: #00ff41;
    color: #000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
}

.step-card h4 {
    color: #00aaff;
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.step-card p {
    color: #888;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.step-example {
    background: rgba(0, 255, 65, 0.1);
    padding: 0.75rem;
    border-radius: 5px;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.step-arrow {
    color: #00ff41;
    font-size: 2rem;
    font-weight: bold;
}

/* Binary Breakdown */
.binary-breakdown {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
}

.breakdown-row {
    display: flex;
    gap: 1rem;
    margin: 0.75rem 0;
    align-items: center;
}

.breakdown-label {
    color: #0cc;
    min-width: 120px;
    font-weight: bold;
}

.breakdown-value {
    color: #00ff41;
    font-size: 1.1rem;
    letter-spacing: 0.2rem;
}

.breakdown-value.highlight {
    background: rgba(0, 255, 65, 0.1);
    padding: 0.5rem;
    border-radius: 5px;
}

.breakdown-value strong {
    color: #00ffaa;
    font-size: 1.2rem;
}

/* ASCII Grid */
.ascii-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.ascii-range {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.ascii-range:hover {
    border-color: #00ff41;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.2);
}

.ascii-range h4 {
    color: #00aaff;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.ascii-range p {
    color: #0cc;
    margin: 0.5rem 0;
}

.ascii-example {
    background: rgba(0, 255, 65, 0.1);
    padding: 0.75rem;
    border-radius: 5px;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
}

/* Tool Navigation */
.tool-nav {
    background: rgba(0, 17, 0, 0.95);
    border: 2px solid rgba(0, 255, 65, 0.5);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.tool-nav h3 {
    color: #00ff41;
    margin-bottom: 1.5rem;
}

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

.tool-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #0cc;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tool-link:hover {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 65, 0.2);
}

.tool-icon {
    font-size: 1.5rem;
}

.tool-name {
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mode-toggle {
        flex-direction: column;
    }
    
    .mode-btn {
        max-width: 100%;
    }
    
    .option-grid {
        grid-template-columns: 1fr;
    }
    
    .example-grid {
        grid-template-columns: 1fr;
    }
    
    .conversion-steps {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .ascii-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-links {
        grid-template-columns: 1fr;
    }
    
    .breakdown-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .breakdown-label {
        min-width: auto;
    }
    
    .breakdown-value {
        font-size: 0.9rem;
        letter-spacing: 0.1rem;
    }
}