/* General Styles */
body {
    font-family: 'Orbitron', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: #222;
    color: #eee;
    transition: background 0.3s, color 0.3s;
}

body.light-theme {
    background: #f0f0f0;
    color: #333;
}

.suite-container {
    width: 95%;
    max-width: 1200px;
    background: #333;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 20px;
    transition: background 0.3s;
}

body.light-theme .suite-container {
    background: #e0e0e0;
    box-shadow: 9px 9px 16px #bebebe, -9px -9px 16px #ffffff;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid #444;
    margin-bottom: 20px;
}

body.light-theme .tabs {
    border-bottom-color: #ccc;
}

.tab-link {
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1.1em;
    color: #aaa;
    font-family: 'Orbitron', sans-serif;
    transition: color 0.3s, background 0.3s;
}

body.light-theme .tab-link {
    color: #555;
}

.tab-link:hover {
    background: #444;
    color: #fff;
}

body.light-theme .tab-link:hover {
    background: #d0d0d0;
    color: #000;
}

.tab-link.active {
    color: #fff;
    border-bottom: 2px solid #00aaff;
}

body.light-theme .tab-link.active {
    color: #000;
    border-bottom-color: #007acc;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Calculator */
#calculator {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.display {
    grid-column: 1 / -1;
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    text-align: right;
    margin-bottom: 10px;
}

body.light-theme .display {
    background: #eee;
}

#display {
    width: 100%;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 2.5em;
    text-align: right;
    outline: none;
}

body.light-theme #display {
    color: #333;
}

.btn {
    padding: 20px;
    font-size: 1.2em;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: #555;
    color: #fff;
    transition: background 0.2s, box-shadow 0.2s;
    font-family: 'Orbitron', sans-serif;
}

body.light-theme .btn {
    background: #d0d0d0;
    color: #333;
    box-shadow: 3px 3px 5px #bebebe, -3px -3px 5px #ffffff;
}

.btn:active {
    box-shadow: inset 3px 3px 5px #222, inset -3px -3px 5px #666;
}

body.light-theme .btn:active {
    box-shadow: inset 3px 3px 5px #bebebe, inset -3px -3px 5px #ffffff;
}

.btn.function { background: #444; }
.btn.operator { background: #666; }
.btn.equals { background: #00aaff; }

body.light-theme .btn.function { background: #c0c0c0; }
body.light-theme .btn.operator { background: #b0b0b0; }
body.light-theme .btn.equals { background: #007acc; color: #fff; }

/* History Panel */
.history-panel {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
}

body.light-theme .history-panel {
    background: #d8d8d8;
}

#history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

#history-list li {
    padding: 10px;
    border-bottom: 1px solid #444;
    cursor: pointer;
    transition: background 0.2s;
}

#history-list li:hover {
    background: #444;
}

body.light-theme #history-list li {
    border-bottom-color: #ccc;
}

body.light-theme #history-list li:hover {
    background: #ccc;
}

#clear-history {
    background: #666;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-family: 'Orbitron', sans-serif;
}

body.light-theme #clear-history {
    background: #999;
}

/* Function Plotter */
.plotter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

#function-input {
    flex-grow: 1;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background: #222;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    outline: none;
}

body.light-theme #function-input {
    background: #fff;
    color: #333;
    border-color: #ccc;
}

#plot-button {
    background: #00aaff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
}

body.light-theme #plot-button {
    background: #007acc;
}

#plot-canvas {
    width: 100%;
    background: #fff;
    border-radius: 10px;
}

/* Unit Converter */
.converter-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.converter-io {
    display: flex;
    align-items: center;
    gap: 10px;
}

.converter-controls select, .converter-controls input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background: #222;
    color: #fff;
    font-size: 1em;
    font-family: 'Orbitron', sans-serif;
    outline: none;
}

body.light-theme .converter-controls select,
body.light-theme .converter-controls input {
    background: #fff;
    color: #333;
    border-color: #ccc;
}

/* Theme Switcher */
#theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .suite-container {
        width: 98%;
        padding: 10px;
    }
    
    #calculator {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .calculator-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .btn {
        padding: 12px 8px;
        font-size: 0.9em;
        min-height: 50px;
    }
    
    #display {
        font-size: 1.8em;
        padding: 15px;
    }
    
    .display {
        padding: 15px;
        margin-bottom: 8px;
    }
    
    .history-panel {
        padding: 15px;
    }
    
    .history-panel h3 {
        margin-top: 0;
        font-size: 1.1em;
    }
}