
:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --dark: #1d3557;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --danger: #f72585;
}


.calculator {
    max-width: 800px;
    width: 100%;
    background-color: var(--dark);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.display {
    background-color: #0a1128;
    color: white;
    padding: 20px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    min-height: 24px;
    margin-bottom: 8px;
    overflow-x: auto;
    white-space: nowrap;
}

.result {
    font-size: 36px;
    font-weight: 500;
    overflow-x: auto;
    white-space: nowrap;
}

.history-panel {
    background-color: #0a1128;
    color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.history-panel.show {
    max-height: 300px;
    overflow-y: auto;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background-color: #0a1128;
    z-index: 10;
}

.history-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.history-clear-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.history-clear-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.history-list {
    padding: 10px 20px;
}

.history-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background-color 0.2s;
}

.history-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.history-expression {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.history-result {
    font-size: 16px;
    font-weight: 500;
}

.history-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 20px 0;
    font-style: italic;
}

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

.btn {
    border-radius: 10px;
    border: none;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.95);
}

.btn-light {
    background-color: #2b2d42;
    color: white;
}

.btn-light:hover {
    background-color: #3c3f58;
}

.btn-primary {
    background-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--secondary);
}

.btn-success {
    background-color: var(--success);
}

.btn-danger {
    background-color: var(--danger);
}

.btn-equals {
    grid-column: span 2;
}

.function-row {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.function-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-grow: 1;
    text-align: center;
    min-width: 60px;
}

.function-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.function-btn.active {
    background-color: var(--primary);
}

.angle-mode {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

@media (max-width: 768px) {
    .buttons {
        grid-template-columns: repeat(6, 1fr);
    }

    .function-row {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .function-btn {
        min-width: 80px;
        flex-grow: 0;
    }
}

@media (max-width: 576px) {
    .buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    .btn {
        padding: 12px 0;
        font-size: 14px;
    }
}


/* Scientif Calc Blog Content User Guide */

.guide-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.header h1 {
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 10px;
}

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

.section {
    margin-bottom: 40px;
}

.section-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.table thead {
    background-color: var(--primary);
    color: white;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(67, 97, 238, 0.05);
}

.example-card {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary);
}

.example-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.example-steps {
    margin-bottom: 15px;
}

.example-result {
    font-weight: 600;
    color: var(--primary);
}

.key-combo {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
}

.btn-icon {
    background-color: #e9ecef;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin-right: 5px;
    font-weight: 600;
}

.tip-box {
    background-color: rgba(76, 201, 240, 0.1);
    border-left: 5px solid var(--success);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.tip-title {
    color: var(--success);
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.tip-title i {
    margin-right: 8px;
}

.warning-box {
    background-color: rgba(247, 37, 133, 0.1);
    border-left: 5px solid var(--danger);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.warning-title {
    color: var(--danger);
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.warning-title i {
    margin-right: 8px;
}

.function-category {
    margin-bottom: 30px;
}

.function-category h4 {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .guide-container {
        padding: 20px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}