/* Cyberpunk & Modern Tech Styles */
:root {
    --primary-color: #00f3ff;     /* Cyber Cyan */
    --secondary-color: #bc13fe;   /* Cyber Purple */
    --accent-color: #ffee00;      /* Cyber Yellow */
    --success-color: #00d68f;
    --warning-color: #ffeaa7;
    --danger-color: #ff2a6d;      /* Neon Red */
    --border-radius: 4px;         /* Sharp tech corners */
    --button-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --card-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
    --transition-speed: 0.2s;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Dark Mode Scrollbar - Cyberpunk Style */
body.dark-mode ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 243, 255, 0.1);
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: rgba(0, 243, 255, 0.3);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.2);
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 243, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

/* Light Mode Scrollbar - Lab Style */
body.light-mode ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(9, 132, 227, 0.4);
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(9, 132, 227, 0.7);
}

/* ========================================
   LOADING SCREEN - Cyberpunk Style
   ======================================== */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    padding: 20px;
    box-sizing: border-box;
}

/* Spinner - Cyber Ring */
#loading-spinner {
    width: 80px;
    height: 80px;
    position: relative;
    margin-bottom: 30px;
}

#loading-spinner::before {
    content: "";
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    animation: spinnerAnimation 1.2s linear infinite;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

#loading-spinner::after {
    content: "";
    box-sizing: border-box;
    position: absolute;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    animation: spinnerAnimation 1.8s linear infinite reverse;
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.3);
}

@keyframes spinnerAnimation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Text */
#loading-text {
    font-size: 18px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    margin-bottom: 10px;
}

/* Cache info text */
#loading-cache-info {
    font-size: 12px;
    color: rgba(0, 243, 255, 0.6) !important;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

/* Error message styling */
#loading-error {
    color: var(--danger-color);
    background-color: rgba(255, 42, 109, 0.1);
    border: 1px solid var(--danger-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    max-width: 90%;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

#loading-error ul {
    text-align: left;
    margin: 10px 0;
    padding-left: 20px;
}

#loading-error li {
    margin: 5px 0;
    color: #e0e0e0;
}

/* Mobile Loading Adjustments */
@media (max-width: 768px) {
    #loading {
        padding: 15px;
    }
    
    #loading-spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    #loading-spinner::after {
        top: 8px;
        left: 8px;
        width: calc(100% - 16px);
        height: calc(100% - 16px);
    }
    
    #loading-text {
        font-size: 14px;
        letter-spacing: 1px;
        padding: 0 10px;
    }
    
    #loading-cache-info {
        font-size: 11px;
        padding: 0 10px;
    }
    
    #loading-error {
        font-size: 12px;
        padding: 15px;
        max-width: 95%;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    #loading-spinner {
        width: 50px;
        height: 50px;
    }
    
    #loading-text {
        font-size: 12px;
    }
}

/* Light mode loading adjustments */
body.light-mode #loading {
    background-color: rgba(240, 242, 245, 0.9);
    color: var(--primary-color);
}

body.light-mode #loading-text {
    color: var(--primary-color);
    text-shadow: none;
}

body.light-mode #loading-spinner::before {
    border-top-color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(9, 132, 227, 0.3);
}

body.light-mode #loading-spinner::after {
    border-top-color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
    box-shadow: 0 0 8px rgba(108, 92, 231, 0.3);
}

body.light-mode #loading-cache-info {
    color: #636e72 !important;
}

body.light-mode #loading-error {
    background-color: rgba(255, 118, 117, 0.1);
    border-color: #ff7675;
    color: #d63031;
}

body.light-mode #loading-error li {
    color: #2d3436;
}

/* Background Grid Effect */
body {
    margin: 0;
    padding: 0;
    font-family: 'JetBrains Mono', 'Roboto', monospace; /* Prefer monospace */
    color: var(--text-color);
    background-color: var(--background-color);
    transition: color 0.4s, background-color 0.4s;
    overflow-x: hidden;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-attachment: fixed;
}

/* Light mode - High Tech Lab */
body.light-mode {
    --text-color: #2d3436;
    --background-color: #f0f2f5;
    --button-bg: #ffffff;
    --button-hover: #f0f0f0;
    --button-text: #2d3436;
    --input-bg: #ffffff;
    --result-bg: #ffffff;
    --calc-bg: rgba(255, 255, 255, 0.85);
    --history-bg: rgba(255, 255, 255, 0.85);
    --history-item-bg: #f8f9fa;
    --border-color: #b2bec3;
    --primary-color: #0984e3;
    --secondary-color: #6c5ce7;
    --function-button-bg: #e1e8ef;
    --function-button-text: #2d3436;
    --equal-button-bg: #00b894;
    --equal-button-text: #ffffff;
    --clear-button-bg: #ff7675;
    --clear-button-text: #ffffff;
    
    /* Override grid for light mode to be subtle gray */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* Dark mode - Cyberpunk */
body.dark-mode {
    --text-color: #e0e0e0;
    --background-color: #050505; /* Deep black */
    --button-bg: rgba(20, 20, 30, 0.8);
    --button-hover: rgba(0, 243, 255, 0.1);
    --button-text: #00f3ff;
    --input-bg: rgba(10, 10, 15, 0.9);
    --result-bg: rgba(10, 10, 15, 0.95);
    --calc-bg: rgba(10, 10, 12, 0.85);
    --history-bg: rgba(10, 10, 12, 0.85);
    --history-item-bg: rgba(20, 20, 30, 0.6);
    --border-color: #00f3ff;
    --primary-color: #00f3ff;
    --secondary-color: #bc13fe;
    --button-glow: rgba(0, 243, 255, 0.4);
    --function-button-bg: rgba(188, 19, 254, 0.1);
    --function-button-text: #bc13fe;
    --equal-button-bg: rgba(0, 243, 255, 0.2);
    --equal-button-text: #00f3ff;
    --clear-button-bg: rgba(255, 42, 109, 0.2);
    --clear-button-text: #ff2a6d;
}

.overlay {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 16px;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Mobile overlay - full width */
@media (max-width: 768px) {
    .overlay {
        padding: 0;
    }
}

.container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
    flex-wrap: nowrap;
    gap: 20px;
}

.calculator {
    flex: 1 1 55%;
    min-width: 500px;
    max-width: 650px;
    background-color: var(--calc-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    box-sizing: border-box;
    margin: 10px;
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.calculator:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.calculator h1 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color); /* Use primary color for title */
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    position: relative;
}

.calculator h1 img {
    width: 42px;
    vertical-align: middle;
    margin-right: 10px;
    /* animation removed */
}

.calculator input {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
    caret-color: var(--primary-color);
}

body.dark-mode .calculator input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.8);
}

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

/* Tech Buttons */
.buttons button {
    padding: 12px 8px;
    font-size: 18px;
    border: 1px solid transparent; /* Placeholder for border transition */
    border-radius: var(--border-radius);
    background-color: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

/* Light mode button style - Clean & Modern */
body.light-mode .buttons button {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--button-text);
}

body.light-mode .buttons button:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

body.light-mode .buttons button:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Dark mode button style - Cyberpunk */
body.dark-mode .buttons button {
    background-color: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

body.dark-mode .buttons button:hover {
    background-color: rgba(0, 243, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    text-shadow: 0 0 5px var(--primary-color);
    transform: translateY(-1px);
}

body.dark-mode .buttons button:active {
    background-color: rgba(0, 243, 255, 0.2);
    transform: translateY(0);
    box-shadow: inset 0 0 10px rgba(0, 243, 255, 0.2);
}

.buttons button.digit {
    font-weight: 700;
    font-size: 20px;
}

/* Special buttons - refined */
.buttons button.equal {
    grid-column: span 4;
    font-size: 22px;
    padding: 15px;
    background-color: var(--equal-button-bg);
    color: var(--equal-button-text);
    font-weight: 600;
    border: 1px solid transparent;
}

body.light-mode .buttons button.equal {
    box-shadow: 0 4px 10px rgba(0, 184, 148, 0.3);
}

body.dark-mode .buttons button.equal {
    background-color: rgba(0, 243, 255, 0.15);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

body.dark-mode .buttons button.equal:hover {
    background-color: var(--primary-color);
    color: #000;
    box-shadow: 0 0 25px var(--primary-color);
}

.buttons button.clear {
    background-color: var(--clear-button-bg);
    color: var(--clear-button-text);
    font-weight: 600;
    border: 1px solid transparent;
}

body.light-mode .buttons button.clear {
    box-shadow: 0 4px 10px rgba(255, 118, 117, 0.3);
}

body.dark-mode .buttons button.clear {
    background-color: rgba(255, 42, 109, 0.15);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    box-shadow: 0 0 10px rgba(255, 42, 109, 0.2);
}

body.dark-mode .buttons button.clear:hover {
    background-color: var(--danger-color);
    color: #fff;
    box-shadow: 0 0 20px var(--danger-color);
}

.buttons button.function {
    background-color: var(--function-button-bg);
    color: var(--function-button-text);
    border: 1px solid transparent;
}

body.light-mode .buttons button.function {
    background-color: #e8e6ff;
    box-shadow: 0 2px 5px rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.1);
}

body.dark-mode .buttons button.function {
    background-color: rgba(188, 19, 254, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(188, 19, 254, 0.3);
    box-shadow: 0 0 5px rgba(188, 19, 254, 0.1);
}

body.dark-mode .buttons button.function:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.4);
    text-shadow: 0 0 5px var(--secondary-color);
}

.buttons button.digit {
    font-weight: 600;
    font-size: 20px;
}

body.dark-mode .buttons button.digit {
    background-color: #2d3436;
    color: #ffffff;
}

/* Hover glow effect removed */

/* Glass morphism effect for calculator and history panels */
/* Tech Panel Styling */
.calculator, .history {
    background-color: var(--calc-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

/* Add cyber corner accents for dark mode */
body.dark-mode .calculator::before,
body.dark-mode .history::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--primary-color);
    border-left: 2px solid var(--primary-color);
    z-index: 1;
}

body.dark-mode .calculator::after,
body.dark-mode .history::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
    z-index: 1;
}

body.dark-mode .calculator:hover,
body.dark-mode .history:hover {
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.15);
    border-color: var(--primary-color);
}

/* Add animation to history items */
.history ul li {
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Add tooltip effect */
.buttons button::after {
    content: attr(title);
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: auto;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: transform 0.2s, opacity 0.2s;
    z-index: 10;
    pointer-events: none;
}

.buttons button:hover::after {
    transform: translateX(-50%) scale(1);
    opacity: 0.9;
}

/* Improve result display for long outputs */
.result {
    font-size: 18px;
    margin-top: 20px;
    color: var(--text-color);
    background-color: var(--result-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

/* Format result value for better readability of long outputs */
.result-value {
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    max-width: 100%;
    padding: 8px;
    margin-top: 4px;
    background-color: rgba(108, 92, 231, 0.05);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}

/* Add visual cue for copying result values */
.result-value:hover {
    background-color: rgba(108, 92, 231, 0.1);
    cursor: text;
    box-shadow: inset 0 0 0 1px rgba(108, 92, 231, 0.2);
}

.result-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    animation: slideInResult 0.4s forwards;
    margin-bottom: 5px;
}

@keyframes slideInResult {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-item:last-child {
    border-bottom: none;
    background-color: rgba(108, 92, 231, 0.05);
    padding: 12px 10px;
    border-radius: 8px;
    margin-top: 5px;
}

.result-label {
    font-weight: 700;
    color: var(--primary-color);
    display: inline-block;
    margin-right: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: rgba(108, 92, 231, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.result-error {
    color: var(--danger-color);
    padding: 12px;
    border-left: 4px solid var(--danger-color);
    background-color: rgba(255, 118, 117, 0.1);
    border-radius: 4px;
    font-weight: 500;
    animation: shakeError 0.5s forwards, fadeIn 0.3s forwards;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.graph-container {
    margin: 10px 0;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--input-bg);
    padding: 10px;
    box-sizing: border-box;
}

.graph-container img {
    max-width: 100%;
    max-height: 500px;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    margin: 0 auto;
    border-radius: 8px;
}

.graph-container img[src^="data:"] {
    opacity: 1;
}

.graph-examples {
    margin: 8px 0;
    padding: 8px;
    background-color: var(--history-item-bg);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent-color);
    font-size: 12px;
}

.graph-examples h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: var(--primary-color);
}

.examples-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2px;
    padding-left: 15px;
    margin: 5px 0;
    list-style-type: disc;
}

.examples-list li {
    font-size: 11px;
    margin-bottom: 2px;
    color: var(--text-color);
}

.examples-list code {
    font-family: 'JetBrains Mono', monospace;
    background-color: rgba(108, 92, 231, 0.1);
    padding: 1px 3px;
    border-radius: 3px;
    font-size: 10px;
}

.graph-tip {
    margin: 5px 0 0;
    font-style: italic;
    font-size: 10px;
    color: var(--primary-color);
    text-align: center;
}

.graph-controls {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.graph-controls button {
    padding: 12px 20px;
    background: linear-gradient(145deg, var(--accent-color), #009e7a);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.graph-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive styles for graph modal */
@media (max-width: 768px) {
    .graph-options {
        flex-direction: column;
    }
    
    .range-inputs {
        min-width: 100%;
    }
    
    .graph-input-row {
        flex-direction: column;
    }
    
    .graph-modal-content {
        width: 95%;
        padding: 20px;
        margin: 10px auto;
    }
}

/* Enhanced graph modal styling */
.graph-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.graph-modal-content {
    position: relative;
    background-color: var(--calc-bg);
    margin: 20px auto;
    padding: 15px;
    border-radius: var(--border-radius);
    max-width: 700px;
    width: calc(100% - 40px);
    box-sizing: border-box;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    max-height: 85vh;
    overflow-y: auto;
    font-size: 14px;
    cursor: move;
}

.graph-modal-content input,
.graph-modal-content button,
.graph-modal-content label,
.graph-modal-content select,
.graph-modal-content textarea,
.graph-modal-content .option-checkbox,
.graph-modal-content .graph-input-row,
.graph-modal-content .graph-controls,
.graph-modal-content img {
    cursor: auto; /* Reset cursor for interactive elements */
}

.graph-modal-content button {
    cursor: pointer; /* Set pointer cursor specifically for buttons */
}

.graph-modal-content h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--title-color);
    text-align: center;
    padding: 5px;
    font-size: 16px;
    border-bottom: 1px solid var(--border-color);
}

.close-graph {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--text-color);
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-graph:hover {
    color: var(--primary-color);
}

/* Theme-specific styling for graph */
body.dark-mode #graph {
    background-color: #2a2d3a;
    border-color: var(--button-shadow-1);
}

body.dark-mode .graph-container {
    --graph-glow: rgba(108, 92, 231, 0.4);
}

body.light-mode .graph-container {
    --graph-glow: rgba(108, 92, 231, 0.1);
}

.history {
    flex: 1 1 40%;
    min-width: 300px;
    max-width: 450px;
    background-color: var(--history-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    box-sizing: border-box;
    margin: 10px;
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.history:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.history h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.history h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.history ul {
    list-style-type: none;
    padding: 0;
    max-height: 600px;
    overflow-y: auto;
    margin: 0;
}

.history ul li {
    background-color: var(--history-item-bg);
    margin-bottom: 10px;
    padding: 15px;
    border-radius: var(--border-radius);
    color: var(--text-color);
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    transition: transform 0.2s;
}

.history ul li:hover {
    transform: translateX(5px);
}

#graph {
    width: 100%;
    height: auto;
    margin-top: 15px;
    border: 1px solid var(--border-color);
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

#graph:hover {
    transform: scale(1.02);
}

/* Theme toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--calc-bg);
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.theme-toggle button {
    padding: 8px 12px;
    font-size: 14px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: var(--button-shadow);
}

.color-schemes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.theme-scheme-btn {
    font-size: 12px !important;
    padding: 6px 8px !important;
    text-align: center;
    opacity: 0.8;
}

.theme-scheme-btn.active {
    opacity: 1;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Specific colors for scheme buttons */
.theme-scheme-btn[data-scheme="default"] {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe) !important;
    color: white !important;
}

.theme-scheme-btn[data-scheme="ocean"] {
    background: linear-gradient(45deg, #0984e3, #74b9ff) !important;
    color: white !important;
}

.theme-scheme-btn[data-scheme="sunset"] {
    background: linear-gradient(45deg, #e17055, #fab1a0) !important;
    color: white !important;
}

.theme-scheme-btn[data-scheme="forest"] {
    background: linear-gradient(45deg, #00b894, #55efc4) !important;
    color: white !important;
}

/* Instruction button */
.instruction-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--button-shadow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-btn:hover {
    background-color: #00a082;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: var(--calc-bg);
    margin: 20px auto;
    padding: 15px;
    border-radius: var(--border-radius);
    max-width: 700px;
    width: calc(100% - 40px);
    box-sizing: border-box;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    max-height: 85vh;
    overflow-y: auto;
    font-size: 14px;
    cursor: move;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--primary-color);
}

.instruction-section {
    margin-bottom: 15px;
}

.instruction-section h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 4px;
    margin-bottom: 8px;
    font-size: 16px;
}

.example-container {
    background-color: var(--history-item-bg);
    border-radius: var(--border-radius);
    padding: 8px;
    margin: 6px 0;
    position: relative;
    border-left: 3px solid var(--primary-color);
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.example-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-color);
    word-wrap: break-word;
    margin-right: 30px;
}

.copy-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-50%) scale(1.05);
}

/* Button animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.instruction-btn {
    animation: pulse 2s infinite;
}

/* Mobile adjustments for instructions */
@media (max-width: 768px) {
    .modal-content {
        width: calc(100% - 40px);
        margin: 20px auto;
        padding: 15px;
        max-width: 95%;
        box-sizing: border-box;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
    }
    
    .example-container {
        width: 100%;
        box-sizing: border-box;
    }
    
    .graph-modal-content {
        width: calc(100% - 40px);
        margin: 20px auto;
        padding: 15px;
        max-width: 95%;
        box-sizing: border-box;
    }
    
    .graph-container {
        padding: 5px;
    }
    
    .graph-container img {
        max-width: 100%;
        height: auto;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .modal-content,
    .graph-modal-content {
        width: calc(100% - 20px);
        margin: 10px auto;
        padding: 10px;
    }
    
    .graph-container {
        min-height: 200px;
    }
}

/* Štýly pre tlačidlo Clear History */
.clear-history-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--clear-button-bg), #e04f4f);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--button-shadow);
    position: relative;
    overflow: hidden;
}

body.light-mode .clear-history-btn {
    box-shadow: 0 8px 15px rgba(255, 118, 117, 0.3);
}

body.dark-mode .clear-history-btn {
    background: linear-gradient(145deg, #ff5d5d, #e44949);
    color: #ffffff;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3), 
              -5px -5px 10px rgba(75, 75, 95, 0.2),
              0 0 15px rgba(255, 82, 82, 0.15);
}

.clear-history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 106, 106, 0.4);
}

.clear-history-btn:active, 
.clear-history-btn.active {
    transform: translateY(0);
    background: linear-gradient(145deg, #e44949, #ff5d5d);
    box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.2);
}

.clear-history-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.clear-history-btn:hover::before {
    left: 100%;
}

/* Animácia pre tlačidlá s triedou removing */
.history ul li.removing {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Animácia pre tlačidlo pri stlačení */
.clicked {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease-in-out !important;
}

/* Animácia farby tlačidla */
.color-transition {
    animation: pulseColor 0.5s ease-in-out;
}

@keyframes pulseColor {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
    100% { filter: brightness(1); }
}

/* Removed duplicate function button styles */

/* Removed duplicate button styles to prevent conflicts with new modern design */

/* Improved graph appearance */
#graph {
    border: 2px solid var(--border-color);
}

body.light-mode #graph {
    background-color: #f8f9fa;
}

body.dark-mode #graph {
    background-color: #2a2d3a;
}

/* Theme toggle buttons styling */
body.light-mode .theme-toggle button {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #dddddd;
}

body.dark-mode .theme-toggle button {
    background-color: #343c3f;
    color: #f5f5f5;
    border: 1px solid #444;
}

/* Style adjustments for better contrast */
.calculator input, .graph-container input {
    border: 2px solid var(--border-color);
}

body.light-mode .calculator input, 
body.light-mode .graph-container input {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

body.dark-mode .calculator input, 
body.dark-mode .graph-container input {
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Improved history items */
body.light-mode .history-expression {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

body.dark-mode .history-expression {
    font-weight: 600;
    margin-bottom: 5px;
    color: #b2acff; /* Svetlejšia farba pre lepšiu viditeľnosť */
}

body.light-mode .history-result {
    font-weight: 500;
    color: #444;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    max-width: 100%;
    display: block;
}

/* Dual input-output field */
.input-output-container {
    background-color: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.input-output-container:focus-within {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.calculation-result {
    padding: 10px 16px;
    min-height: 28px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(108, 92, 231, 0.05);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    transition: all 0.3s ease;
}

.calculation-result.error {
    color: var(--danger-color);
    background-color: rgba(255, 118, 117, 0.1);
}

.calculation-result.success {
    color: var(--success-color);
    background-color: rgba(0, 184, 148, 0.05);
}

.input-output-container input {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    border: none;
    box-sizing: border-box;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
    caret-color: var(--primary-color);
    outline: none;
}

/* Exception for the input inside input-output-container */
.input-output-container input {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Pridanie responzívneho správania iba pre malé obrazovky */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
        flex-wrap: wrap;
    }
    
    .calculator, .history {
        min-width: auto;
        max-width: 100%;
        width: 100%;
    }
}

/* Tlačidlo pre otvorenie grafu v hlavičke */
.graph-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1;
}

.graph-button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    background-color: var(--primary-color);
}

.graph-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px;
    background-color: var(--history-item-bg);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent-color);
    width: 100%;
    box-sizing: border-box;
}

.range-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px;
    width: 100%;
}

.range-group {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-start;
}

.range-group label {
    min-width: 45px;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-color);
    text-align: left;
}

.range-group input {
    flex: 1;
    width: 100%;
    max-width: 100px;
    padding: 4px 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.options-group {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 5px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 12px;
}

.option-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.graph-input-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    width: 100%;
}

.graph-input-row input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.graph-input-row button,
.graph-controls button {
    padding: 6px 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 12px;
    font-weight: 500;
}

.graph-input-row button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 4px;
        gap: 8px;
    }

    .calculator {
        min-width: unset;
        width: 100%;
        padding: 12px;
        margin: 0;
        border-radius: 0; /* Full width = no rounded corners */
        border-left: none;
        border-right: none;
    }

    .calculator h1 {
        font-size: 22px;
    }

    .calculator h1 img {
        width: 28px;
    }

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

    .buttons button {
        padding: 10px 6px;
        font-size: 16px;
        min-height: 44px;
    }

    .input-output-container {
        margin-bottom: 10px;
    }

    .input-output-container input {
        font-size: 16px;
        padding: 12px;
    }

    .calculation-result {
        font-size: 14px;
        padding: 8px 12px;
    }

    .history {
        width: 100%;
        margin: 0;
        padding: 12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .history h2 {
        font-size: 20px;
    }

    .history ul li {
        font-size: 14px;
        padding: 8px 12px;
    }

    .theme-toggle {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1000;
    }

    .color-schemes {
        display: none;
    }

    .instruction-btn {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1000;
        padding: 8px 12px;
        font-size: 14px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        padding: 16px;
    }

    .instructions-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .graph-modal-content {
        width: 95%;
        padding: 16px;
    }

    .graph-options {
        flex-direction: column;
    }

    .range-inputs {
        grid-template-columns: 1fr 1fr;
    }

    .graph-input-row {
        flex-direction: column;
        gap: 8px;
    }

    .graph-input-row input,
    .graph-input-row button {
        width: 100%;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 2px;
        gap: 6px;
    }
    
    .buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }

    .calculator {
        padding: 8px;
    }

    .calculator h1 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .calculator h1 img {
        width: 24px;
    }

    .buttons button {
        padding: 8px 4px;
        font-size: 14px;
        min-height: 40px;
    }

    .input-output-container input {
        font-size: 14px;
        padding: 10px;
    }

    .calculation-result {
        font-size: 12px;
        padding: 6px 10px;
    }

    .history h2 {
        font-size: 18px;
    }

    .history ul li {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        flex-direction: row;
    }

    .calculator {
        width: 60%;
    }

    .history {
        width: 40%;
    }

    .buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile header buttons */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background-color: var(--calc-bg);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.mobile-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Advanced functions toggle */
.advanced-toggle {
    display: none;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
}

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

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

/* Advanced functions toggle and buttons */
.advanced-toggle-mobile {
    display: none;
}

.advanced-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
    grid-column: span 4;
    margin: 12px 0;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .mobile-header {
        display: block;
    }

    .container {
        padding-top: 55px;
    }

    .calculator {
        min-width: unset;
        width: 100%;
        padding: 12px;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .advanced-toggle {
        display: block;
    }
    
    .advanced-toggle-mobile {
        display: block;
        width: 100%;
        padding: 12px;
        margin: 10px 0;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        border: none;
        border-radius: var(--border-radius);
        cursor: pointer;
        font-size: 14px;
        text-align: center;
        box-shadow: var(--button-shadow);
        transition: all 0.3s ease;
        grid-column: span 4;
    }

    .toggle-icon {
        display: inline-block;
        transition: transform 0.3s;
        margin-right: 5px;
    }

    .advanced-toggle-mobile.active .toggle-icon {
        transform: rotate(180deg);
    }

    .advanced-buttons {
        display: none;
        margin-top: 10px;
        animation: slideDown 0.3s ease-out;
        gap: 8px !important;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Modal adjustments for mobile */
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 15px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
    }
    
    .example-container {
        width: 100%;
        box-sizing: border-box;
    }
    
    .graph-modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .range-inputs {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .graph-input-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .graph-input-row input,
    .graph-input-row button {
        width: 100%;
    }
    
    .examples-list {
        font-size: 14px;
    }
    
    /* Equal button positioning */
    .function.equal {
        grid-column: span 4;
        margin-top: 10px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .advanced-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }
    
    .modal-content,
    .graph-modal-content {
        width: calc(100% - 10px);
        margin: 5px auto;
        padding: 10px;
    }
    
    .graph-container {
        min-height: 200px;
    }
    
    .history {
        padding: 8px;
    }
    
    .history ul li {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* Ensure buttons have consistent styling */
.buttons button,
.advanced-buttons button {
    padding: 12px 8px;
    font-size: 16px;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
}

/* Mobile button adjustments */
@media (max-width: 768px) {
    .buttons button,
    .advanced-buttons button {
        font-size: 16px;
        padding: 10px 8px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .buttons button,
    .advanced-buttons button {
        font-size: 13px;
        padding: 8px 4px;
        min-height: 38px;
    }
}

/* Equal button styling */
.function.equal {
    grid-column: span 4;
    margin-top: 10px;
} 