* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

header h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 300;
}

.anycoder-link {
    color: #ffd700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.anycoder-link:hover {
    color: #fff;
    text-decoration: underline;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

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

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

.display {
    margin-bottom: 1.5rem;
}

#display {
    width: 100%;
    height: 80px;
    border: none;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 2.5rem;
    text-align: right;
    padding: 0 1rem;
    color: #333;
    font-weight: 300;
    outline: none;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 0.75rem;
}

.btn {
    height: 70px;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn:active {
    transform: scale(0.95);
}

.number {
    background: #f8f9fa;
    color: #333;
}

.number:hover {
    background: #e9ecef;
}

.operator {
    background: #007bff;
    color: white;
}

.operator:hover {
    background: #0056b3;
}

.equals {
    background: #28a745;
    color: white;
    grid-row: span 2;
}

.equals:hover {
    background: #1e7e34;
}

.clear {
    background: #dc3545;
    color: white;
}

.clear:hover {
    background: #c82333;
}

.decimal {
    background: #6c757d;
    color: white;
}

.decimal:hover {
    background: #545b62;
}

.zero {
    grid-column: span 2;
}

footer {
    background: rgba(0, 0, 0, 0.1);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

@media (max-width: 480px) {
    .calculator {
        padding: 1.5rem;
    }
    
    .btn {
        height: 60px;
        font-size: 1.3rem;
    }
    
    #display {
        height: 70px;
        font-size: 2rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}