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

body {
    min-height: 100vh;
    background: linear-gradient(45deg, #1a2a6c, #b21f1f, #fdbb2d);
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

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

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

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

button {
    padding: 15px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

button:hover {
    background: rgba(255, 255, 255, 0.2);
}

button:active {
    transform: scale(0.95);
}

.operator {
    background: rgba(178, 31, 31, 0.3);
}

.function {
    background: rgba(253, 187, 45, 0.3);
}

.equal {
    background: rgba(26, 42, 108, 0.3);
}

.constant {
    background: rgba(178, 31, 31, 0.3);
}

.link-tree {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none;
}

.link-tree h1 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-button {
    padding: 15px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    text-align: center;
}

.link-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.back-button {
    margin-top: 20px;
    width: 100%;
    background: rgba(26, 42, 108, 0.3);
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    button {
        padding: 10px;
        font-size: 16px;
    }
    
    #display {
        height: 50px;
        font-size: 20px;
    }
}