.converter-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.converter-header {
    text-align: center;
    margin-bottom: 40px;
}

.converter-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.converter-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.converter-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.calculator-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.input-section {
    margin-bottom: 20px;
}

.input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.input-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
}

.input-section small {
    color: #6c757d;
    font-size: 0.85rem;
}

.convert-btn {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.convert-btn:hover {
    background: #5a6fd8;
}

.result-section {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.result-value {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #28a745;
}

.calculation-steps {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.explanation-section {
    padding: 20px;
}

.method-steps {
    margin: 25px 0;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.step-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.step p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.example {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.example h4 {
    margin-top: 0;
    color: #2c3e50;
}

.calculation {
    font-family: 'Courier New', monospace;
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.calculation p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .converter-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calculator-section {
        padding: 20px;
    }
}


.reference-table {
    margin-top: 30px;
}

.reference-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.reference-table th,
.reference-table td {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.reference-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.division-steps table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.division-steps th,
.division-steps td {
    padding: 10px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.division-steps th {
    background: #f8f9fa;
    font-weight: 600;
}

.division-steps tr:nth-child(even) {
    background: #f8f9fa;
}

.applications {
    margin-top: 30px;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.applications h4 {
    margin-top: 0;
    color: #2c3e50;
}

.applications ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.applications li {
    margin-bottom: 8px;
    color: #495057;
}

.conversion-steps table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.conversion-steps th,
.conversion-steps td {
    padding: 10px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.conversion-steps th {
    background: #f8f9fa;
    font-weight: 600;
}

.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 40px;
}

.calculator-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.calculator-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.main-calculator {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.input-panel {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
}

.base-selectors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.base-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.base-selector select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
}

.universal-btn {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.universal-btn:hover {
    background: #5a6fd8;
}

.results-panel {
    margin-top: 30px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.result-card {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid;
}

.result-card.binary { border-color: #e74c3c; background: #fdedec; }
.result-card.decimal { border-color: #3498db; background: #ebf5fb; }
.result-card.hexadecimal { border-color: #9b59b6; background: #f4ecf7; }
.result-card.octal { border-color: #f39c12; background: #fef9e7; }

.result-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.result-value {
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.step-by-step-detailed {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

/* Sidebar Styles */
.sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-card, .quick-conversions, .validation-rules {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.info-card h3, .quick-conversions h3, .validation-rules h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.system-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f8f9fa;
}

.system-info:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.system-info h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.system-info p {
    margin: 5px 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.quick-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-btn {
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.quick-btn:hover {
    background: #5a6fd8;
}

.validation-rules ul {
    margin: 0;
    padding-left: 20px;
}

.validation-rules li {
    margin-bottom: 8px;
    color: #495057;
}

@media (max-width: 968px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .base-selectors {
        grid-template-columns: 1fr;
    }
    
    .quick-buttons {
        grid-template-columns: 1fr;
    }
}


.arithmetic-calculator {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.operation-selector {
    margin-bottom: 30px;
}

.operation-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.op-btn {
    padding: 15px 10px;
    background: #e9ecef;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.op-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.op-btn:hover:not(.active) {
    background: #dee2e6;
}

.binary-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.operation-sign {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #667eea;
    padding-bottom: 12px;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.calculate-btn:hover {
    background: #5a6fd8;
}

.result-display {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #28a745;
}

.binary-result {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.decimal-equivalent {
    color: #6c757d;
    font-style: italic;
}

/* Guide Styles */
.arithmetic-guide {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.guide-section, .examples-section, .applications-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

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

.rule-card {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.rule-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.rule-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rule-row {
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.example-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.example-btn {
    padding: 12px 8px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.example-btn:hover {
    background: #5a6fd8;
}

.applications-section ul {
    margin: 0;
    padding-left: 20px;
}

.applications-section li {
    margin-bottom: 8px;
    color: #495057;
}

/* Step-by-step tables */
.addition-steps table,
.subtraction-steps table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9rem;
}

.addition-steps th,
.addition-steps td,
.subtraction-steps th,
.subtraction-steps td {
    padding: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.addition-steps th,
.subtraction-steps th {
    background: #f8f9fa;
    font-weight: 600;
}

@media (max-width: 768px) {
    .operation-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .binary-inputs {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .operation-sign {
        padding: 10px;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .example-buttons {
        grid-template-columns: 1fr;
    }
    
    .addition-steps table,
    .subtraction-steps table {
        font-size: 0.8rem;
    }
}