/* Global Colors   */
:root {
    --wbg: #fff;
    --dark: #020E1E;
    --gold: #5b4501;
    --input: #858585;
}

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* General */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

/* Global Styles */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #a0a0a0 50%, #707070 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-blend-mode: luminosity;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    font-family: "Bw Modelica SS02" "poppins" "Helvetica", sans-serif "Noto Naskh Arabic", serif;

    /* Disable Text Selection, Copy, Cut, Paste and Right-click */
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Material Icons Alignment */
.material-icons {
    vertical-align: middle;
}

/* Header Styles */
header h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Info Box Styles */
.info-box {
    background: linear-gradient(135deg, #ac240d 0%, #be540e 100%);
    color: white;
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.info-box h5 {
    font-weight: 600;
    margin-bottom: 15px;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 8px 0 8px 30px;
    position: relative;
}

.info-box li::before {
    content: "▸";
    position: absolute;
    left: 10px;
    font-size: 1.2rem;
}

/* Matrix Card Styles */
.matrix-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.matrix-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.matrix-card .card-header {
    padding: 15px;
    font-weight: 600;
}

.matrix-card .card-body {
    padding: 25px;
    background: #f8f9fa;
}

/* Matrix Grid Styles */
.matrix-grid {
    gap: 8px;
}

.matrix-row {
    display: flex;
    gap: 8px;
}

.matrix-cell {
    width: 60px;
    height: 45px;
    text-align: center;
    font-size: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.matrix-cell:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

/* Scalar Input */
#scalarValue {
    font-size: 1.3rem;
    font-weight: 600;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

#scalarValue:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

/* Operation Buttons */
.btn-lg {
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    color: var(--gold);
}

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

.btn-lg .material-icons {
    font-size: 1.5rem;
    margin-right: 8px;
}

/* Custom Button Colors */
.btn-success {
    background: linear-gradient(135deg, #c3a117 0%, #d6d92e 100%);
    border: none;
    color: var(--dark);
}

.btn-danger {
    background: linear-gradient(135deg, #fd7182 0%, #f9705b 100%);
    border: none;
    color: var(--dark);
}

.btn-warning {
    background: linear-gradient(135deg, #f6a1ff 0%, #ff6b7f 100%);
    border: none;
    color: var(--dark);
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: var(--dark);
}

.btn-info {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border: none;
    color: var(--dark);
}

.btn-secondary {
    background: linear-gradient(135deg, #c0c1c1 0%, #858585 100%);
    border: none;
    color: var(--dark);
}

/* Error Message */
#errorMessage {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

#errorMessage .material-icons {
    margin-right: 10px;
}

/* Result Section */
.result-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    animation: slideIn 0.5s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    font-weight: 600;
}

.result-card .card-body {
    padding: 30px;
    background: #f8f9fa;
}

#resultMatrix {
    gap: 10px;
}

.result-row {
    display: flex;
    gap: 10px;
}

.result-cell {
    width: 80px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    font-family: 'Courier New', monospace;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Card Shadows */
.card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.shadow-sm {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Form Control Enhancements */
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

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

    header h1 .material-icons {
        font-size: 2rem !important;
    }

    .matrix-cell {
        width: 50px;
        height: 40px;
        font-size: 0.9rem;
    }

    .result-cell {
        width: 60px;
        height: 45px;
        font-size: 1rem;
    }

    .btn-lg {
        font-size: 0.95rem;
        padding: 10px 15px;
    }

    .btn-lg .material-icons {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .matrix-cell {
        width: 45px;
        height: 38px;
        font-size: 0.85rem;
    }

    .result-cell {
        width: 50px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* Utility Classes */
.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .btn,
    .form-control {
        display: none;
    }
}

a {
    color: var(--dark);
    text-decoration: none;
    font-size: 15px;
    position: relative;
}

a:hover {
    color: var(--gold);
    text-decoration: none;
}


.references-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    line-height: 1.8;
    text-align: center;
}


/* Footer */
.footer {
    padding: 10px;
    width: 100%;
    background-color: var(--dark);
    font-size: small;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 999;
}

.footer_text {
    font-size: small;
    color: var(--input);
}

#footer .copyright {
    font-size: small;
    text-align: center;
}

@media (max-width: 1199px) {
    #footer {
        position: static;
        width: auto;
        padding: 20px 15px;
    }
}

/*--------------------------------------------------------------
# by: Gamal Nabih |  1LineArt Studio | https://1lineart.com
--------------------------------------------------------------*/