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

body {
    background: linear-gradient(135deg, #1a1a1a, #4a4a4a);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.navigation {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.navigation a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navigation a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navigation a.active {
    background: rgba(255, 255, 255, 0.2);
}

.calculator-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.scientific-calculator, .sequence-calculator {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 300px;
}

h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.display {
    margin-bottom: 20px;
}

#display {
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-size: 24px;
    color: #fff;
    text-align: right;
    margin-bottom: 10px;
}

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

button {
    padding: 15px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.operator {
    background: rgba(255, 165, 0, 0.2);
}

.special {
    background: rgba(255, 69, 0, 0.2);
}

.function {
    background: rgba(100, 149, 237, 0.2);
}

.sequence-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    color: #fff;
    font-size: 14px;
}

.input-group input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sequence-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.sequence-buttons button {
    background: rgba(100, 149, 237, 0.2);
}

.sequence-results {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    color: #fff;
}

.sequence-results h3 {
    margin-bottom: 10px;
    text-align: center;
}

#sequenceOutput, #seriesSum {
    word-wrap: break-word;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .calculator-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .scientific-calculator, .sequence-calculator {
        width: 100%;
        max-width: 400px;
    }
}